yuqi1129 commented on code in PR #12168:
URL: https://github.com/apache/gravitino/pull/12168#discussion_r3683238149


##########
api/src/main/java/org/apache/gravitino/exceptions/OptimisticLockException.java:
##########
@@ -16,35 +16,37 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.gravitino.encryption.kms;
+package org.apache.gravitino.exceptions;
 
 import com.google.errorprone.annotations.FormatMethod;
 import com.google.errorprone.annotations.FormatString;
-import org.apache.gravitino.exceptions.ConnectionFailedException;
 
-/** Indicates that a KMS backend rejected or could not resolve configured 
credentials. */
-public class KmsAuthenticationException extends ConnectionFailedException {
+/**
+ * Exception thrown when an optimistic-lock update fails because the entity 
changed after it was
+ * read.
+ */
+public class OptimisticLockException extends GravitinoRuntimeException {
 

Review Comment:
   The client can judge the detailed problem by the exception and choose to 
retry or just to stop the operations. For example, if a user wants to update a 
table and gets an `OptimisticLockException`, then he can reload the table and 
then retry. 



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to