Skip to content
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

Fix fake complete issue in offloading #9306

Merged
merged 3 commits into from
Jan 26, 2021
Merged

Conversation

Renkai
Copy link
Contributor

@Renkai Renkai commented Jan 25, 2021

In our current code, complete in offloading context may set true even sync metadata to Zookeeper failed, which may lead to more fatal error like data in Bookkeeper will be deleted but other managed ledger will see data not offloaded and try to read from Bookkeeper.

This PR make sure local ledger info will be updated after Zookeeper updated.

Signed-off-by: Renkai <gaelookair@gmail.com>
Signed-off-by: Renkai <gaelookair@gmail.com>
@Renkai
Copy link
Contributor Author

Renkai commented Jan 26, 2021

/pulsarbot run-failure-checks

@Renkai
Copy link
Contributor Author

Renkai commented Jan 26, 2021

/pulsarbot run-failure-checks

1 similar comment
@Renkai
Copy link
Contributor Author

Renkai commented Jan 26, 2021

/pulsarbot run-failure-checks

@hangc0276 hangc0276 merged commit 3c22b47 into apache:master Jan 26, 2021
@codelipenghui codelipenghui added the cherry-picked/branch-2.7 Archived: 2.7 is end of life label Jan 26, 2021
codelipenghui pushed a commit that referenced this pull request Jan 26, 2021
### Motivation
In our current code, complete in offloading context may set true even sync metadata to Zookeeper failed, which may lead to more fatal error like data in Bookkeeper will be deleted but other managed ledger will see data not offloaded and try to read from Bookkeeper.

### Modification
This PR make sure local ledger info will be updated after Zookeeper updated.
* prevent ledgers info change without write to zk succeed
* add unit test to prevent fake positive when offload failed

(cherry picked from commit 3c22b47)
codelipenghui pushed a commit that referenced this pull request Jan 26, 2021
### Motivation
In our current code, complete in offloading context may set true even sync metadata to Zookeeper failed, which may lead to more fatal error like data in Bookkeeper will be deleted but other managed ledger will see data not offloaded and try to read from Bookkeeper.

### Modification
This PR make sure local ledger info will be updated after Zookeeper updated.
* prevent ledgers info change without write to zk succeed
* add unit test to prevent fake positive when offload failed

(cherry picked from commit 3c22b47)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants