Skip to content

ZOOKEEPER-3594: Don't propose error transactions - #2070

Open
kezhuw wants to merge 1 commit into
apache:masterfrom
kezhuw:ZOOKEEPER-3594-not-propose-error-transactions
Open

ZOOKEEPER-3594: Don't propose error transactions#2070
kezhuw wants to merge 1 commit into
apache:masterfrom
kezhuw:ZOOKEEPER-3594-not-propose-error-transactions

Conversation

@kezhuw

@kezhuw kezhuw commented Sep 27, 2023

Copy link
Copy Markdown
Member

As discussions in ZOOKEEPER-3418 and ZOOKEEPER-3594, there is no reason for us to propose error transactions. It is a waste of both network traffic/latency and disk storage.

This pr introduces a new quorum packet type SKIP. Leader uses it to signal request owner to abort pending request.

Since SKIP is a new packet type, so skipErrorTxn must not be turned on during rolling upgrade.

JIRA: ZOOKEEPER-3594(#1172)

@kezhuw kezhuw left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pr conflicts with #2069 in handling of Proposal.pendingRequests and Proposal.pendingSyncs. They could be easily unified once one of the two merged. This pr also should be rebased once #2068 merged to remove syncClient in testing code.

case Leader.SKIP:
// It is sad that we have no breadcrumbs to route packet back to origin. Basically, we have choices:
// 1. Attach breadcrumbs to outstanding request.
// This request protocol changes and protocol version bumping.

@kezhuw kezhuw Sep 27, 2023

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could also cover #2069 if we want to go this way. I prefer this actually. We will inevitably introduce protocol changes in long term future. If so, why now ? But it still could be a separate issue before 3.10.0.

@BeforeEach
@Override
public void setUp() throws Exception {
// TODO: setup an follower as observer master.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am working on this. I could be a bit late due to my personal schedule.

As discussions in ZOOKEEPER-3418 and ZOOKEEPER-3594, there is no reason
for us to propose error transactions. It is a waste of both network
traffic/latency and disk storage.

This pr introduces a new quorum packet type `SKIP`. Leader uses it to
signal request owner to abort pending request.

Since `SKIP` is a new packet type, so `skipErrorTxn` must not be turned
on during rolling upgrade.

JIRA: ZOOKEEPER-3594
@kezhuw
kezhuw force-pushed the ZOOKEEPER-3594-not-propose-error-transactions branch from abb2747 to 8c7bfc6 Compare September 27, 2023 13:49
@ghost

ghost commented Oct 18, 2023

Copy link
Copy Markdown

Can i contribute

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant