Prevent commitProxyServer from modifying ServerDBInfo object
This commit is contained in:
parent
a106d40012
commit
1a20cf9579
|
@ -1596,7 +1596,7 @@ ACTOR static Future<Void> rejoinServer(CommitProxyInterface proxy, ProxyCommitDa
|
|||
}
|
||||
}
|
||||
|
||||
ACTOR Future<Void> ddMetricsRequestServer(CommitProxyInterface proxy, Reference<AsyncVar<ServerDBInfo>> db) {
|
||||
ACTOR Future<Void> ddMetricsRequestServer(CommitProxyInterface proxy, Reference<AsyncVar<ServerDBInfo> const> db) {
|
||||
loop {
|
||||
choose {
|
||||
when(state GetDDMetricsRequest req = waitNext(proxy.getDDMetrics.getFuture())) {
|
||||
|
@ -1754,7 +1754,8 @@ ACTOR Future<Void> proxySnapCreate(ProxySnapRequest snapReq, ProxyCommitData* co
|
|||
return Void();
|
||||
}
|
||||
|
||||
ACTOR Future<Void> proxyCheckSafeExclusion(Reference<AsyncVar<ServerDBInfo>> db, ExclusionSafetyCheckRequest req) {
|
||||
ACTOR Future<Void> proxyCheckSafeExclusion(Reference<AsyncVar<ServerDBInfo> const> db,
|
||||
ExclusionSafetyCheckRequest req) {
|
||||
TraceEvent("SafetyCheckCommitProxyBegin");
|
||||
state ExclusionSafetyCheckReply reply(false);
|
||||
if (!db->get().distributor.present()) {
|
||||
|
@ -1783,7 +1784,7 @@ ACTOR Future<Void> proxyCheckSafeExclusion(Reference<AsyncVar<ServerDBInfo>> db,
|
|||
}
|
||||
|
||||
ACTOR Future<Void> reportTxnTagCommitCost(UID myID,
|
||||
Reference<AsyncVar<ServerDBInfo>> db,
|
||||
Reference<AsyncVar<ServerDBInfo> const> db,
|
||||
UIDTransactionTagMap<TransactionCommitCostEstimation>* ssTrTagCommitCost) {
|
||||
state Future<Void> nextRequestTimer = Never();
|
||||
state Future<Void> nextReply = Never();
|
||||
|
@ -1818,7 +1819,7 @@ ACTOR Future<Void> reportTxnTagCommitCost(UID myID,
|
|||
|
||||
ACTOR Future<Void> commitProxyServerCore(CommitProxyInterface proxy,
|
||||
MasterInterface master,
|
||||
Reference<AsyncVar<ServerDBInfo>> db,
|
||||
Reference<AsyncVar<ServerDBInfo> const> db,
|
||||
LogEpoch epoch,
|
||||
Version recoveryTransactionVersion,
|
||||
bool firstProxy,
|
||||
|
@ -2037,7 +2038,7 @@ ACTOR Future<Void> commitProxyServerCore(CommitProxyInterface proxy,
|
|||
}
|
||||
}
|
||||
|
||||
ACTOR Future<Void> checkRemoved(Reference<AsyncVar<ServerDBInfo>> db,
|
||||
ACTOR Future<Void> checkRemoved(Reference<AsyncVar<ServerDBInfo> const> db,
|
||||
uint64_t recoveryCount,
|
||||
CommitProxyInterface myInterface) {
|
||||
loop {
|
||||
|
@ -2051,7 +2052,7 @@ ACTOR Future<Void> checkRemoved(Reference<AsyncVar<ServerDBInfo>> db,
|
|||
|
||||
ACTOR Future<Void> commitProxyServer(CommitProxyInterface proxy,
|
||||
InitializeCommitProxyRequest req,
|
||||
Reference<AsyncVar<ServerDBInfo>> db,
|
||||
Reference<AsyncVar<ServerDBInfo> const> db,
|
||||
std::string whitelistBinPaths) {
|
||||
try {
|
||||
state Future<Void> core = commitProxyServerCore(proxy,
|
||||
|
|
|
@ -161,7 +161,7 @@ struct ProxyCommitData {
|
|||
RequestStream<GetReadVersionRequest> getConsistentReadVersion;
|
||||
RequestStream<CommitTransactionRequest> commit;
|
||||
Database cx;
|
||||
Reference<AsyncVar<ServerDBInfo>> db;
|
||||
Reference<AsyncVar<ServerDBInfo> const> db;
|
||||
EventMetricHandle<SingleKeyMutation> singleKeyMutationEvent;
|
||||
|
||||
std::map<UID, Reference<StorageInfo>> storageCache;
|
||||
|
@ -239,7 +239,7 @@ struct ProxyCommitData {
|
|||
RequestStream<GetReadVersionRequest> getConsistentReadVersion,
|
||||
Version recoveryTransactionVersion,
|
||||
RequestStream<CommitTransactionRequest> commit,
|
||||
Reference<AsyncVar<ServerDBInfo>> db,
|
||||
Reference<AsyncVar<ServerDBInfo> const> db,
|
||||
bool firstProxy)
|
||||
: dbgid(dbgid), stats(dbgid, &version, &committedVersion, &commitBatchesMemBytesCount), master(master),
|
||||
logAdapter(nullptr), txnStateStore(nullptr), popRemoteTxs(false), committedVersion(recoveryTransactionVersion),
|
||||
|
|
|
@ -886,7 +886,7 @@ ACTOR Future<Void> masterServer(MasterInterface mi,
|
|||
bool forceRecovery);
|
||||
ACTOR Future<Void> commitProxyServer(CommitProxyInterface proxy,
|
||||
InitializeCommitProxyRequest req,
|
||||
Reference<AsyncVar<ServerDBInfo>> db,
|
||||
Reference<AsyncVar<ServerDBInfo> const> db,
|
||||
std::string whitelistBinPaths);
|
||||
ACTOR Future<Void> grvProxyServer(GrvProxyInterface proxy,
|
||||
InitializeGrvProxyRequest req,
|
||||
|
|
Loading…
Reference in New Issue