dennishuo opened a new pull request, #1139:
URL: https://github.com/apache/polaris/pull/1139

   Add AtomicOperationMetaStoreManager  class which starts as just a full 
copy/paste
   of PolarisMetaStoreManagerImpl, but remove all its usage of runInTransaction
   instead only using the "doFooAtomically" BasePersistence methods.
   
   Implement the intended compare-and-swap semantics in 
writeEntity/writeEntities
   in AbstractTransactionalPersistence so that the TreeMap and EclipseLink impls
   can both actually successfully be used in "single-durable-operation" mode
   as plain BasePersistence implementations (e.g. without using their
   runInTransaction capabilities at all).
   
   Add PolarisTreeMapAtomicOperationMetaStoreManagerTest which covers this new 
class
   in polaris-core:test, and add InMemoryAtomicOperationMetaStoreManagerFactory
   which allows making all integration tests and the default `gradle run` use 
the new atomic
   operations implementation if `polaris.persistence.type=in-memory-atomic`.
   
   Add TODO comments for all methods that still require additional thought to 
achieve "strict"
   correctness in the face of concurrency, but which aren't easily exercised by 
existing test cases.
   
   With this initial implementation, all current tests pass, and the main four 
core mutation methods
   are indeed "strictly" correct with compare-and-swap mechanics:
   
   1. updateEntityPropertiesIfNotChanged
   2. updateEntitiesPropertiesIfNotChanged
   3. createEntityIfNotExists
   4. createEntitiesIfNotExists
   
   For all other methods, generally the baseline functionality is still 
"correct" in the face of
   concurrency, but certain happens-before relationships are violated when 
grants interact with
   entity mutations, until we fix the noted TODOs.
   
   Additionally, some multi-entity methods (e.g. CreateCatalog which also 
creates a CatalogRole and
   assigns grants), currently can leave a partial-creation state, until the 
TODOs are implemented to
   change the ordering of operations appropriately.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@polaris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to