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, shardsAffectedByTeamFailure,
lock, lock,
getAverageShardBytes, getAverageShardBytes,
getUnhealthyRelocationCount, getUnhealthyRelocationCount.getFuture(),
getMinReplicasRemaining, getMinReplicasRemaining,
self->ddId, self->ddId,
storageTeamSize, storageTeamSize,

View File

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

View File

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