[
https://issues.apache.org/jira/browse/HDDS-15946?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Janus Chow updated HDDS-15946:
------------------------------
Description:
This ticket includes the follows tasks:
|*Sub-task*|*Scope*|*Acceptance*|
| T2.1 interface + default generator | `VersionIdGenerator` interface;
`TransactionIndexVersionIdGenerator`; the
`ozone.om.versioning.version-id-generator` class-name config, loaded
reflectively | shared contract test (strictly increasing / frozen / reserved
ids) run against every generator; unknown class and class not implementing the
interface both rejected; default generator carries no allocator state |
| T2.2 commit-time ordering check | `VersionIdAllocator`: refuse a commit whose
id does not come after the key's current version; fall back to a
versionedKeyTable lookup for records predating versioning | increasing id
accepted; id at or below the current one rejected with `INVALID_REQUEST`; taken
id on a pre-versioning record rejected with `KEY_ALREADY_EXISTS`; steady state
performs no lookup (unit test asserts versionedKeyTable is never touched) |
| T2.3 pinned-first generator | `PinnedFirstVersionIdGenerator`: first-version
detection (no current in keyTable) + `FIRST_VERSION_ID = 1` sentinel | first
PUT gets the sentinel, later PUTs get transaction indexes; sentinel sorts
before every transaction index; sentinel does not collide with the null slot;
selectable by configuration |
was:
This ticket includes the follows tasks:
|*Sub-task*|*Scope*|*Acceptance*|
|T2.1 interface + default strategy|VersionIdGenerator interface;
TRANSACTION_INDEX implementation (transaction-index derivation); the
ozone.om.versioning.version-id-strategy config|monotonic/frozen/0-reserved
constraints unit-tested; default path carries no allocator state (no extra
reads/writes)|
|T2.2 bucket strategy pinning|write the strategy into bucket metadata when
versioning is first enabled; immutable afterwards|changing the cluster config
does not affect already-enabled buckets (unit test); proto compatible|
|T2.3 PINNED_FIRST strategy|first-version detection (no current in keyTable) +
FIRST_VERSION_ID sentinel + configurable rendering (fixed literal /
keyName-derived)|first PUT gets the sentinel, later PUTs get transaction
indexes (unit test); GET ?versionId=0 reads the first version; sentinel does
not collide with the null slot (0)|
> [Ozone versioning] VersionId generation strategy framework
> ----------------------------------------------------------
>
> Key: HDDS-15946
> URL: https://issues.apache.org/jira/browse/HDDS-15946
> Project: Apache Ozone
> Issue Type: Sub-task
> Reporter: Janus Chow
> Assignee: Janus Chow
> Priority: Major
>
> This ticket includes the follows tasks:
> |*Sub-task*|*Scope*|*Acceptance*|
> | T2.1 interface + default generator | `VersionIdGenerator` interface;
> `TransactionIndexVersionIdGenerator`; the
> `ozone.om.versioning.version-id-generator` class-name config, loaded
> reflectively | shared contract test (strictly increasing / frozen / reserved
> ids) run against every generator; unknown class and class not implementing
> the interface both rejected; default generator carries no allocator state |
> | T2.2 commit-time ordering check | `VersionIdAllocator`: refuse a commit
> whose id does not come after the key's current version; fall back to a
> versionedKeyTable lookup for records predating versioning | increasing id
> accepted; id at or below the current one rejected with `INVALID_REQUEST`;
> taken id on a pre-versioning record rejected with `KEY_ALREADY_EXISTS`;
> steady state performs no lookup (unit test asserts versionedKeyTable is never
> touched) |
> | T2.3 pinned-first generator | `PinnedFirstVersionIdGenerator`:
> first-version detection (no current in keyTable) + `FIRST_VERSION_ID = 1`
> sentinel | first PUT gets the sentinel, later PUTs get transaction indexes;
> sentinel sorts before every transaction index; sentinel does not collide with
> the null slot; selectable by configuration |
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]