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

Safe freeing of ids for HA slaves #7511

Merged
merged 8 commits into from Jul 11, 2016
Merged

Conversation

burqen
Copy link
Contributor

@burqen burqen commented Jul 5, 2016

Forward merge of #7477

MASTER
Master now buffer ids for a specified time, called the safe zone. Within this safe zone window
records are guaranteed not to be reused.

SLAVE
UpdatePuller makes sure no transactions break the safe zone boundary
by killing transactions that fall outside during pull update.

The transactions store the latest_applied_transaction_commit_time when
they start and TransactionCommitingResonseUnpacker kills the transactions
as new transactions (pulled from master) get applied by comparing
the stored commit_time with the new latest_applied_transaction_commit_time
after applying the batch.

If the batch itself spans over a greater time than what fits inside the safe zone,
no more transacions can be started on slave until the entire batch is applied.

Safe zone is configurable through a setting

SECONDARY CHANGES
Added knowledge about last tx commit timestamp to MetaDataStore and StoreMigrator

lutovich and others added 4 commits July 4, 2016 20:59
Moved safeZone handling logic from BatchingResponseHandler to new TransactionQueue.Applier to have a cleaner separation of responsibility.

 Now TransactionQueue drive batching and transaction application instead of BatchingResponseHandler.
this( "" );
super( "The transaction has been terminated.Simply retry your operation in a new transaction, " +
"and you should see a successful result." + status.code().description() + " " + additionalInfo );
this.status = status;
Copy link
Contributor

Choose a reason for hiding this comment

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

You are missing a space in the message, before Simply. Also, I don't think the word "simply" adds very much.

Copy link
Contributor

Choose a reason for hiding this comment

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

There's also no space between the message and the status code description.

@chrisvest chrisvest merged commit 17d1379 into neo4j:3.0 Jul 11, 2016
@burqen burqen deleted the 3.0-free-ids-in-ha branch May 3, 2018 13:36
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.

None yet

4 participants