Skip to content

Commit c07d23b

Browse files
authored
Core: Clarify the atomicity of BasePersistence methods (#1274)
1 parent 5b58c33 commit c07d23b

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

polaris-core/src/main/java/org/apache/polaris/core/persistence/BasePersistence.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@
3838
* defining the internal data model for Polaris, and which defines the basis for the RBAC model
3939
* provided by Polaris.
4040
*
41+
* <p>Each method in this interface must be atomic, meaning that write operations must either fully
42+
* succeed with all changes applied, or fail entirely without partial updates. Read operations must
43+
* provide a consistent view of the data as it existed at the start of the operation.
44+
*
4145
* <p>Note that APIs to the actual persistence store are very basic, often point read or write to
4246
* the underlying data store. The goal is to make it really easy to back this using databases like
4347
* Postgres or simpler KV store.

polaris-core/src/main/java/org/apache/polaris/core/persistence/IntegrationPersistence.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@
3131
* persistence entities but which typically involve additional separate external integrations
3232
* related to identity/auth, kms/secrets storage, etc.
3333
*
34+
* <p>Each method in this interface must be atomic, meaning that write operations must either fully
35+
* succeed with all changes applied, or fail entirely without partial updates. Read operations must
36+
* provide a consistent view of the data as it existed at the start of the operation.
37+
*
3438
* <p>Implementations should orchestrate any necessary multi-phase protocols such as leasing an
3539
* external resource before committing a reference to the external resource in the Polaris
3640
* persistence layer, etc.

0 commit comments

Comments
 (0)