Restrict write access to getUnhealthyRelocationCount

This commit is contained in:
sfc-gh-tclinkenbeard 2022-04-03 23:47:54 -07:00
parent 33fb6ab983
commit 70f378bacc
3 changed files with 4 additions and 6 deletions

View File

@ -754,7 +754,7 @@ ACTOR Future<Void> dataDistribution(Reference<DataDistributorData> self,
shardsAffectedByTeamFailure,
lock,
getAverageShardBytes,
getUnhealthyRelocationCount,
getUnhealthyRelocationCount.getFuture(),
getMinReplicasRemaining,
self->ddId,
storageTeamSize,

View File

@ -267,7 +267,7 @@ ACTOR Future<Void> dataDistributionQueue(Database cx,
Reference<ShardsAffectedByTeamFailure> shardsAffectedByTeamFailure,
MoveKeysLock lock,
PromiseStream<Promise<int64_t>> getAverageShardBytes,
PromiseStream<Promise<int>> getUnhealthyRelocationCount,
FutureStream<Promise<int>> getUnhealthyRelocationCount,
FutureStream<Promise<Optional<int>>> getMinRemainingReplicas,
UID distributorId,
int teamSize,

View File

@ -1722,7 +1722,7 @@ ACTOR Future<Void> dataDistributionQueue(Database cx,
Reference<ShardsAffectedByTeamFailure> shardsAffectedByTeamFailure,
MoveKeysLock lock,
PromiseStream<Promise<int64_t>> getAverageShardBytes,
PromiseStream<Promise<int>> getUnhealthyRelocationCount,
FutureStream<Promise<int>> getUnhealthyRelocationCount,
FutureStream<Promise<Optional<int>>> getMinReplicasRemaining,
UID distributorId,
int teamSize,
@ -1854,9 +1854,7 @@ ACTOR Future<Void> dataDistributionQueue(Database cx,
when(Promise<Optional<int>> r = waitNext(getMinReplicasRemaining)) {
r.send(self.getMinReplicasRemaining());
}
when(Promise<int> r = waitNext(getUnhealthyRelocationCount.getFuture())) {
r.send(self.unhealthyRelocations);
}
when(Promise<int> r = waitNext(getUnhealthyRelocationCount)) { r.send(self.unhealthyRelocations); }
when(wait(self.error.getFuture())) {} // Propagate errors from dataDistributionRelocator
when(wait(waitForAll(balancingFutures))) {}
}