Bug fix: CommitQuorum::addRequestActor() accesses self after destruction due to ignoring actor_cancelled error. (#5744)

This commit is contained in:
Steve Atherton 2021-10-11 12:17:09 -07:00 committed by GitHub
parent 6abeb89f95
commit 2ebaddcc1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -58,6 +58,11 @@ class CommitQuorum {
wait(retryBrokenPromise(cti.commit, self->getCommitRequest(generation)));
++self->successful;
} catch (Error& e) {
// self might be destroyed if this actor is canceled
if (e.code() == error_code_actor_cancelled) {
throw;
}
if (e.code() == error_code_not_committed) {
++self->failed;
} else {