jerryshao commented on code in PR #5728:
URL: https://github.com/apache/gravitino/pull/5728#discussion_r1879506711


##########
core/src/main/java/org/apache/gravitino/storage/relational/mapper/provider/base/ModelMetaBaseSQLProvider.java:
##########
@@ -134,4 +134,11 @@ public String deleteModelMetasByLegacyTimeline(
         + ModelMetaMapper.TABLE_NAME
         + " WHERE deleted_at > 0 AND deleted_at < #{legacyTimeline} LIMIT 
#{limit}";
   }
+
+  public String updateModelLatestVersion(@Param("modelId") Long modelId) {
+    return "UPDATE "
+        + ModelMetaMapper.TABLE_NAME
+        + " SET model_latest_version = model_latest_version + 1"
+        + " WHERE model_id = #{modelId} AND deleted_at = 0";

Review Comment:
   I change to use a transaction to handle this, can you please review again?



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