flyrain commented on code in PR #4961:
URL: https://github.com/apache/polaris/pull/4961#discussion_r3555275772


##########
polaris-core/src/main/java/org/apache/polaris/core/semantic/exceptions/SemanticModelVersionMismatchException.java:
##########
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.polaris.core.semantic.exceptions;
+
+import org.apache.polaris.core.exceptions.PolarisException;
+
+/**
+ * Thrown when a semantic-model update supplies an {@code entity-version} that 
does not match the
+ * version currently stored in the catalog (optimistic-concurrency conflict). 
Maps to HTTP 409.

Review Comment:
   Etag is essentially an opaque string at http level to identify if the object 
is stale or not. Clients are not supposed to interpret it. The staleness isn't 
necessarily related to the entity version, which is used for OCC. There are 
potentially use cases that catalog may attach additional information while 
generating the Etag. The version is specified only for OCC, not for ETag, not 
for spec version. I'm open for suggestions if you think we could have a better 
name for `entity-version`, but conceptually, it's a version for OCC and only 
for OCC.



-- 
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