Merge pull request #7262 from sfc-gh-xwang/readaware
Fix heap-use-after-free caused by early noErrorsActors destroy
This commit is contained in:
commit
173bcfc528
|
@ -143,7 +143,7 @@ void ServerKnobs::initialize(Randomize randomize, ClientKnobs* clientKnobs, IsSi
|
||||||
|
|
||||||
init( PRIORITY_RECOVER_MOVE, 110 );
|
init( PRIORITY_RECOVER_MOVE, 110 );
|
||||||
init( PRIORITY_REBALANCE_UNDERUTILIZED_TEAM, 120 );
|
init( PRIORITY_REBALANCE_UNDERUTILIZED_TEAM, 120 );
|
||||||
init( PRIORITY_REBALANCE_READ_UNDERUTIL_TEAM, 121 );
|
init( PRIORITY_REBALANCE_READ_UNDERUTIL_TEAM, 121 );
|
||||||
init( PRIORITY_REBALANCE_OVERUTILIZED_TEAM, 122 );
|
init( PRIORITY_REBALANCE_OVERUTILIZED_TEAM, 122 );
|
||||||
init( PRIORITY_REBALANCE_READ_OVERUTIL_TEAM, 123 );
|
init( PRIORITY_REBALANCE_READ_OVERUTIL_TEAM, 123 );
|
||||||
init( PRIORITY_PERPETUAL_STORAGE_WIGGLE, 139 );
|
init( PRIORITY_PERPETUAL_STORAGE_WIGGLE, 139 );
|
||||||
|
@ -163,8 +163,8 @@ void ServerKnobs::initialize(Randomize randomize, ClientKnobs* clientKnobs, IsSi
|
||||||
init( READ_REBALANCE_CPU_THRESHOLD, 15.0 );
|
init( READ_REBALANCE_CPU_THRESHOLD, 15.0 );
|
||||||
init( READ_REBALANCE_SRC_PARALLELISM, 20 );
|
init( READ_REBALANCE_SRC_PARALLELISM, 20 );
|
||||||
init( READ_REBALANCE_SHARD_TOPK, READ_REBALANCE_SRC_PARALLELISM * 2 );
|
init( READ_REBALANCE_SHARD_TOPK, READ_REBALANCE_SRC_PARALLELISM * 2 );
|
||||||
init( READ_REBALANCE_DIFF_FRAC, 0.3);
|
init( READ_REBALANCE_DIFF_FRAC, 0.3);
|
||||||
init( READ_REBALANCE_MAX_SHARD_FRAC, 0.2); // FIXME: add buggify here when we have DD test, seems DD is pretty sensitive to this parameter
|
init( READ_REBALANCE_MAX_SHARD_FRAC, 0.2); // FIXME: add buggify here when we have DD test, seems DD is pretty sensitive to this parameter
|
||||||
init( RETRY_RELOCATESHARD_DELAY, 0.1 );
|
init( RETRY_RELOCATESHARD_DELAY, 0.1 );
|
||||||
init( DATA_DISTRIBUTION_FAILURE_REACTION_TIME, 60.0 ); if( randomize && BUGGIFY ) DATA_DISTRIBUTION_FAILURE_REACTION_TIME = 1.0;
|
init( DATA_DISTRIBUTION_FAILURE_REACTION_TIME, 60.0 ); if( randomize && BUGGIFY ) DATA_DISTRIBUTION_FAILURE_REACTION_TIME = 1.0;
|
||||||
bool buggifySmallShards = randomize && BUGGIFY;
|
bool buggifySmallShards = randomize && BUGGIFY;
|
||||||
|
|
|
@ -440,6 +440,8 @@ ACTOR Future<Void> dataDistributionRelocator(struct DDQueueData* self,
|
||||||
const DDEnabledState* ddEnabledState);
|
const DDEnabledState* ddEnabledState);
|
||||||
|
|
||||||
struct DDQueueData {
|
struct DDQueueData {
|
||||||
|
ActorCollectionNoErrors noErrorActors; // has to be the last one to be destroyed because other Actors may use it.
|
||||||
|
|
||||||
UID distributorId;
|
UID distributorId;
|
||||||
MoveKeysLock lock;
|
MoveKeysLock lock;
|
||||||
Database cx;
|
Database cx;
|
||||||
|
@ -479,7 +481,6 @@ struct DDQueueData {
|
||||||
PromiseStream<RelocateData> dataTransferComplete;
|
PromiseStream<RelocateData> dataTransferComplete;
|
||||||
PromiseStream<RelocateData> relocationComplete;
|
PromiseStream<RelocateData> relocationComplete;
|
||||||
PromiseStream<RelocateData> fetchSourceServersComplete; // find source SSs for a relocate range
|
PromiseStream<RelocateData> fetchSourceServersComplete; // find source SSs for a relocate range
|
||||||
ActorCollectionNoErrors noErrorActors;
|
|
||||||
|
|
||||||
PromiseStream<RelocateShard> output;
|
PromiseStream<RelocateShard> output;
|
||||||
FutureStream<RelocateShard> input;
|
FutureStream<RelocateShard> input;
|
||||||
|
|
Loading…
Reference in New Issue