-
Notifications
You must be signed in to change notification settings - Fork 902
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue #3005: Fix ack broken entry succeed in ensemble change unsetting #3041
base: master
Are you sure you want to change the base?
Issue #3005: Fix ack broken entry succeed in ensemble change unsetting #3041
Conversation
@fpj @sijie @ivankelly Could you please take time to evaluate this ? |
// completes. | ||
// | ||
// We call sendAddSuccessCallback after unsetting all pending adds to cover this case. | ||
sendAddSuccessCallbacks(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for multiple pendingAddOps requests, just call sendAddSuccessCallbacks once time?
is it right? @kezhuw
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sendAddSuccessCallbacks
has loop itself, it is unnecessary to call it multiple times after we unset all pending operations.
The keypoint this pr trying to solve is that eager sendAddSuccessCallbacks
per pendingAddOp
could make later pendingAddOp
s, which have not been unset, complete spuriously.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok,nice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
rerun failure checks or rebase the master new code,it fix some failed checks |
8ae5036
to
5c1014a
Compare
fix old workflow,please see #3455 for detail |
Currently, in `LedgerHandle.unsetSuccessAndSendWriteRequest`, `LedgerHandle.sendAddSuccessCallbacks` could be called by `PendingAddOp.unsetSuccessAndSendWriteRequest` **before** all pending adds evaluated. This will make entries which met ack requirement in old ensemble but have not evaluated yet succeed in new ensemble. Fixes apache#3005.
5c1014a
to
fa22562
Compare
rerun failure checks |
Descriptions of the changes in this PR:
Motivation
Currently, in
LedgerHandle.unsetSuccessAndSendWriteRequest
,LedgerHandle.sendAddSuccessCallbacks
could be called byPendingAddOp.unsetSuccessAndSendWriteRequest
before all pendingadds evaluated. This will make entries which met ack requirement in old
ensemble but have not evaluated yet succeed in new ensemble.
Changes
Check succeeded entries after unsetting all pending entries in ensemble change unsetting.
Master Issue: #3005
Further thoughts
PendingAddOp.writeComplete
callsLedgerHandle.sendAddSuccessCallbacks
incompleted
branch.Currently,
LedgerHandle.sendAddSuccessCallbacks
will not be called if failed bookies overlap with all pending write ensembles. So, the code inPendingAddOp.writeComplete
sounds help.But after changed,
LedgerHandle.sendAddSuccessCallbacks
will be called unconditionally after all pending adds complete unsetting. So I think the snippet inPendingAddOp.writeComplete
does not help anymore. Can it be dropped ? I am not that confident. Post my thoughts here for evaluation.