-
Notifications
You must be signed in to change notification settings - Fork 103
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
IGNITE-24571 Add methods for saving configuration and leases in the TX storage #5254
Conversation
a40eba7
to
1547c5f
Compare
1547c5f
to
d5353ff
Compare
/** | ||
* Prefix to store lease information. | ||
*/ | ||
private static final byte LEASE_INFO_PREFIX = 3; |
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.
private static final byte LEASE_INFO_PREFIX = 3; | |
private static final byte LEASE_INFO_PREFIX = 2; |
void updateLastApplied(WriteBatch writeBatch, long index, long term) throws RocksDBException { | ||
columnFamily.put(writeBatch, lastAppliedKey, indexAndTermToBytes(index, term)); | ||
|
||
lastAppliedIndex = index; |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
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.
No, because these methods are only used during snapshots and write command handling, which are linearized by Raft
@@ -403,8 +382,6 @@ public void destroy() { | |||
try (WriteBatch writeBatch = new WriteBatch()) { | |||
clearStorageData(writeBatch); | |||
|
|||
writeBatch.delete(lastAppliedIndexAndTermKey); |
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.
Shouldn't we keep this for older storage versions?
Or we could "migrate" the value in start() method. Read value from the data storage, save to meta storage and delete from data storage
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.
Shouldn't we keep this for older storage versions?
No, because this key will actually be removed by clearStorageData
, this call was always obsolete.
Or we could "migrate" the value in start() method
I think it's just extra code that we will get rid of later anyway
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
https://issues.apache.org/jira/browse/IGNITE-24571
Thank you for submitting the pull request.
To streamline the review process of the patch and ensure better code quality
we ask both an author and a reviewer to verify the following:
The Review Checklist
- There is a single JIRA ticket related to the pull request.
- The web-link to the pull request is attached to the JIRA ticket.
- The JIRA ticket has the Patch Available state.
- The description of the JIRA ticket explains WHAT was made, WHY and HOW.
- The pull request title is treated as the final commit message. The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
Notes