Merge pull request #7262 from sfc-gh-xwang/readaware

Fix heap-use-after-free caused by early noErrorsActors destroy
This commit is contained in:
Xiaoxi Wang 2022-05-27 11:35:11 -07:00 committed by GitHub
commit 173bcfc528
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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;