You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@polaris.apache.org by "lkindere (via GitHub)" <gi...@apache.org> on 2025/04/04 07:19:03 UTC

[I] jakarta.persistence.OptimisticLockException [polaris]

lkindere opened a new issue, #1306:
URL: https://github.com/apache/polaris/issues/1306

   ### Describe the bug
   
   During the execution of our maintenance operations (RewriteManifestsSparkAction) we noticed this exception:
   
   ```
   CommitStateUnknownException: Service failed: 500: jakarta.persistence.OptimisticLockException: Exception [EclipseLink-5006] (Eclipse Persistence Services - 4.0.5.v202412231137-a96b873527f305f932543045c8679bb1de8d3a43): org.eclipse.persistence.exceptions.OptimisticLockException
   Exception Description: The object [org.apache.polaris.jpa.models.ModelEntity@429b223f] cannot be updated because it has changed or been deleted since it was last read. 
   Class> org.apache.polaris.jpa.models.ModelEntity Primary Key> [[51, 448]: 2990]
   Cannot determine whether the commit was successful or not, the underlying data files may or may not be needed. Manual intervention via the Remove Orphan Files Action can remove these files when a connection to the Catalog can be re-established if the commit was actually unsuccessful.
   Please check to see whether or not your commit was successful before retrying this commit. Retrying an already successful operation will result in duplicate records or unintentional modifications.
   At this time no files will be deleted including possibly unused manifest lists.
   Caused by: ServiceFailureException: Service failed: 500: jakarta.persistence.OptimisticLockException: Exception [EclipseLink-5006] (Eclipse Persistence Services - 4.0.5.v202412231137-a96b873527f305f932543045c8679bb1de8d3a43): org.eclipse.persistence.exceptions.OptimisticLockException
   Exception Description: The object [org.apache.polaris.jpa.models.ModelEntity@429b223f] cannot be updated because it has changed or been deleted since it was last read. 
   Class> org.apache.polaris.jpa.models.ModelEntity Primary Key> [[51, 448]: 2990]
   Exception Description: The object [org.apache.polaris.jpa.models.ModelEntity@429b223f] cannot be updated because it has changed or been deleted since it was last read. 
   Class> org.apache.polaris.jpa.models.ModelEntity Primary Key> [[51, 448]: 2990]
   Cannot determine whether the commit was successful or not, the underlying data files may or may not be needed. Manual intervention via the Remove Orphan Files Action can remove these files when a connection to the Catalog can be re-established if the commit was actually unsuccessful.
   Please check to see whether or not your commit was successful before retrying this commit. Retrying an already successful operation will result in duplicate records or unintentional modifications.
   At this time no files will be deleted including possibly unused manifest lists.
   ```
   
   Is this something that could be retry-able from Polaris catalog implementation itself or should each application using the catalog implement retries to handle this?
   
   ### To Reproduce
   
   _No response_
   
   ### Actual Behavior
   
   _No response_
   
   ### Expected Behavior
   
   _No response_
   
   ### Additional context
   
   _No response_
   
   ### System information
   
   _No response_


-- 
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-unsubscribe@polaris.apache.org.apache.org

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


Re: [I] jakarta.persistence.OptimisticLockException [polaris]

Posted by "singhpk234 (via GitHub)" <gi...@apache.org>.
singhpk234 commented on issue #1306:
URL: https://github.com/apache/polaris/issues/1306#issuecomment-2957271339

   please use new JDBC based persistence it has way to do configure your retry pattern before giving up. https://github.com/apache/polaris/pull/1470


-- 
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-unsubscribe@polaris.apache.org

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


Re: [I] jakarta.persistence.OptimisticLockException [polaris]

Posted by "singhpk234 (via GitHub)" <gi...@apache.org>.
singhpk234 closed issue #1306: jakarta.persistence.OptimisticLockException
URL: https://github.com/apache/polaris/issues/1306


-- 
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-unsubscribe@polaris.apache.org

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


Re: [I] jakarta.persistence.OptimisticLockException [polaris]

Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on issue #1306:
URL: https://github.com/apache/polaris/issues/1306#issuecomment-2968675163

   > is it possible to move from EclipseLink to JDBC without problems?
   
   This is a very strong requirement :) On a more serious note, please consider https://github.com/apache/polaris-tools/tree/main/polaris-synchronizer


-- 
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-unsubscribe@polaris.apache.org

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


Re: [I] jakarta.persistence.OptimisticLockException [polaris]

Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on issue #1306:
URL: https://github.com/apache/polaris/issues/1306#issuecomment-2968676535

   EclipseLink, while being deprecated, will still be included in 1.0.0, AFAIK.


-- 
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-unsubscribe@polaris.apache.org

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


Re: [I] jakarta.persistence.OptimisticLockException [polaris]

Posted by "hguercan (via GitHub)" <gi...@apache.org>.
hguercan commented on issue #1306:
URL: https://github.com/apache/polaris/issues/1306#issuecomment-2967147866

   Hello, 
   Thank you for your answer. Is there a reference for the configuration for the retry pattern? 
   The current README is not stating anything in that regard. 
   Also is it possible to move from EclipseLink to JDBC without problems? 


-- 
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-unsubscribe@polaris.apache.org

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