a.fix heap-use-after-free caused by early noErrorsActors destroy

This commit is contained in:
Xiaoxi Wang 2022-05-26 15:55:14 -07:00
parent 4ccaacdd59
commit 74748c20a0
2 changed files with 5 additions and 4 deletions

View File

@ -440,6 +440,8 @@ ACTOR Future<Void> dataDistributionRelocator(struct DDQueueData* self,
const DDEnabledState* ddEnabledState);
struct DDQueueData {
ActorCollectionNoErrors noErrorActors; // has to be the last one to be destroyed because other Actors may use it.
UID distributorId;
MoveKeysLock lock;
Database cx;
@ -479,7 +481,6 @@ struct DDQueueData {
PromiseStream<RelocateData> dataTransferComplete;
PromiseStream<RelocateData> relocationComplete;
PromiseStream<RelocateData> fetchSourceServersComplete; // find source SSs for a relocate range
ActorCollectionNoErrors noErrorActors;
PromiseStream<RelocateShard> output;
FutureStream<RelocateShard> input;