You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 3, 2024. It is now read-only.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This PR enables versioned CAS operations for DIX without requiring DTM. This is needed to select the most recent version when working with read-write quorums.
Design
Currently, several factors control whether versioned CAS operations are used. In particular,
the COF_VERSIONED flag
the presence of a valid transaction descriptor
This means that currently, versioned CAS only works with DTM in place. In order to allow versioned operations regardless of DTM status, this PR relaxes the second requirement. If COF_VERSIONED is passed but no transaction is set, the current time is automatically used. This should probably be a settable parameter, but the version info is passed to CAS as part of the transaction so the interface is a bit awkward when the transaction is null. Rather than checking for a full transaction descriptor (ID, participants, etc.), this PR changes CAS to only require a timestamp to enable versioned operations. I updated the unit tests to check that a zero version gets overwritten.
The other major change is adding the COF_VERSIONED flag to DIX operations. This has some implications for semantics (e.g. delete of a non-existent record returns 0 rather than ENOENT). It also requires put to have COF_OVERWRITE. I updated the unit tests for these changes. It might be necessary to check with clients (RGW) to ensure that this won't be a problem. Also note that without DTM and log pruner versions may accumulate (delete adds a tombstone rather than deleting records), so this PR could increase storage usage.
I wasn't certain about how versioning should interact with e.g. layouts, so detailed review is appreciated. Also need feedback to make sure this won't conflict with plans for DTM0.
Coding
Checklist for Author
Coding conventions are followed and code is consistent
Testing
Checklist for Author
Unit and System Tests are added
Test Cases cover Happy Path, Non-Happy Path and Scalability
Testing was performed with RPM
Impact Analysis
Checklist for Author/Reviewer/GateKeeper
Interface change (if any) are documented
Side effects on other features (deployment/upgrade)
Dependencies on other component(s)
Review Checklist
Checklist for Author
JIRA number/GitHub Issue added to PR
PR is self reviewed
Jira and state/status is updated and JIRA is updated with PR link
Check if the description is clear and explained
Documentation
Checklist for Author
Changes done to WIKI / Confluence page / Quick Start Guide
@rkothiya : You can consider following commit description,
To support consistency with read-write quorums, version suppport is needed
for CAS operations.
Solution
Currently, several factors control whether versioned CAS operations are used.
In particular,
- the COF_VERSIONED flag
- the presence of a valid transaction descriptor
If COF_VERSIONED is passed but no transaction is set, which is done when DTM0
is enabled, the current time is automatically used.
Rather than checking for a full transaction descriptor (ID, participants, etc.),
allowed CAS to only require a timestamp to enable versioned operations.
The other major change is adding the COF_VERSIONED flag to DIX operations.
This has some implications for semantics (e.g. delete of a non-existent
record returns 0 rather than ENOENT). It also requires put to have COF_OVERWRITE support.
This change enables CAS VERSION support tombstone addition for delete operations.
Note that without DTM and log pruner versions may accumulate as delete adds a tombstone
rather than deleting records, so tombstone cleanup will be needed otherwise which
will occupy meta-data storage.
Signed-off-by: Tim Shaffer <tim.shaffer@seagate.com>
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem Statement
This PR enables versioned CAS operations for DIX without requiring DTM. This is needed to select the most recent version when working with read-write quorums.
Design
Currently, several factors control whether versioned CAS operations are used. In particular,
COF_VERSIONED
flagThis means that currently, versioned CAS only works with DTM in place. In order to allow versioned operations regardless of DTM status, this PR relaxes the second requirement. If
COF_VERSIONED
is passed but no transaction is set, the current time is automatically used. This should probably be a settable parameter, but the version info is passed to CAS as part of the transaction so the interface is a bit awkward when the transaction is null. Rather than checking for a full transaction descriptor (ID, participants, etc.), this PR changes CAS to only require a timestamp to enable versioned operations. I updated the unit tests to check that a zero version gets overwritten.The other major change is adding the
COF_VERSIONED
flag to DIX operations. This has some implications for semantics (e.g. delete of a non-existent record returns 0 rather thanENOENT
). It also requires put to haveCOF_OVERWRITE
. I updated the unit tests for these changes. It might be necessary to check with clients (RGW) to ensure that this won't be a problem. Also note that without DTM and log pruner versions may accumulate (delete adds a tombstone rather than deleting records), so this PR could increase storage usage.I wasn't certain about how versioning should interact with e.g. layouts, so detailed review is appreciated. Also need feedback to make sure this won't conflict with plans for DTM0.
Coding
Checklist for Author
Testing
Checklist for Author
Impact Analysis
Checklist for Author/Reviewer/GateKeeper
Review Checklist
Checklist for Author
Documentation
Checklist for Author