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(duplication): dup would get stuck in DS_PREPARE indefinitely once some error occurred during creating follower table #2144

Merged

Conversation

empiredan
Copy link
Contributor

@empiredan empiredan commented Nov 8, 2024

Fix #2146.

As is described in issue, once there are some errors occurred during the follower
table is being created, the follower cluster might replied with ERR_APP_EXIST
to the source cluster. Then, the source cluster would continue to send the same
request to create table on the follower cluster again. As such, the dup would get
stuck in the current status, namely DS_PREPARE, and could not forward to the
next status.

The core idea to solve this problem is that we should make the request that create
table on follower cluster idempotent. The follower cluster should process the repeated
requests correctly. To implement this, an environment variable marking creating status
is added and sent together with the request to the follower cluster. The follower cluster
would choose to commit it to meta data on both remote storage and local memory, or
just ignore it, or reply to source cluster with some error code.

@empiredan empiredan added component/duplication cluster duplication type/bug-fix This PR fixes a bug. labels Nov 8, 2024
@github-actions github-actions bot added the cpp label Nov 8, 2024
@empiredan empiredan marked this pull request as ready for review November 14, 2024 09:20
acelyc111
acelyc111 previously approved these changes Nov 14, 2024
@empiredan empiredan changed the title fix(duplication): dup would get stuck in DS_PREPARE indefinitely once some error occurred during creating follower table fix(duplication): dup would get stuck in DS_PREPARE indefinitely once some error occurred during creating follower table Nov 14, 2024
@empiredan empiredan merged commit 6330427 into apache:master Nov 15, 2024
114 of 115 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/duplication cluster duplication cpp scripts type/bug-fix This PR fixes a bug.
Projects
None yet
3 participants