Repository navigation
DynamoDB (atomic) persistence backend [draft/showcase] - #5694
Draft
ZephyrYWZhou wants to merge 3 commits into
Draft
ZephyrYWZhou wants to merge 3 commits into
ZephyrYWZhou wants to merge 3 commits into
Conversation
First step toward an optional DynamoDB persistence backend (apache#5615): adds the persistence/dynamodb Gradle module (wired into the build and the published BOM) with the DynamoDbConfiguration interface. No logic and no behavior change; the factory and adapter land in subsequent PRs.
Address review feedback on apache#5622: - Rename polaris-persistence-dynamodb -> polaris-persistence-dynamodb-atomic (persistence/dynamodb -> persistence/dynamodb-atomic) to distinguish it from the parallel NoSQL-framework DynamoDB effort. This module implements the Atomic (per-entity compare-and-set) approach under AtomicOperationMetaStoreManager. - Add a module README marking it work in progress. Updates the project mapping and published BOM reference accordingly. No behavior change.
Implements BasePersistence, IntegrationPersistence, and PolicyMappingPersistence for the dynamodb-atomic module on the single-table layout: per-entity entityVersion CAS, atomic name-sentinel uniqueness, TransactWriteItems multi-entity writes, GSI-backed listing and grant lookups, principal-secret CRUD, policy-mapping adjacency list, and location-overlap detection. Draft to showcase the end-to-end shape; no tests yet.
6 tasks done
6 tasks done
|
This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
Contributor
Author
|
This PR is not for merging purpose but will serve as a display for anyone who is interested in the high level idea of this proposal. It will be closed when incremental PRs are finished. |
Contributor
|
@ZephyrYWZhou : Thanks for submitting this PR! Its purpose is clear. Even if it gets closed by the github bot, it's not a problem. It will still serve its purpose since the diff will remain accessible to readers. |
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Draft showcase of a full DynamoDB persistence backend for Polaris, built on the
AtomicOperationMetaStoreManager(the same approach asrelational-jdbc). Posted per the discussion on #5622 to show the end-to-end shape before the skeleton lands.Builds on the skeleton module in #5622. Related discussion: #5615.
Implemented
BasePersistence— entities, grants, lookups, listingentityVersion+grantRecordsVersionCASTransactWriteItemsas the entity writeEntityIdToken, id-ordered)IntegrationPersistence— principal-secret CRUD (hashes+salt only; CAS rotation); storage-integration hooks are OSS no-ops (JDBC parity)PolicyMappingPersistence— policy mappings as a strongly-consistent adjacency list (target-side + policy-side items written atomically)hasOverlappingSiblings— location-overlap detectionSingle-table layout
One table,
realmIdas a key prefix; two sparse GSIs (by-name, by-grantee). EntityPK = realmId#id; grants co-located under the securable; a name sentinel enforces uniqueness.Status
Work in progress — not for merge. No tests yet; the intended test is the shared persistence conformance suite against DynamoDB-Local (testcontainers), mirroring the JDBC backend. Opening as a draft to showcase the fundamental code.