jerryshao commented on code in PR #10613:
URL: https://github.com/apache/gravitino/pull/10613#discussion_r3019618185
##########
core/src/main/java/org/apache/gravitino/storage/relational/service/FilesetMetaService.java:
##########
@@ -220,17 +220,17 @@ public <E extends Entity & HasIdentifier> FilesetEntity
updateFileset(
// deleted_at`, it means that no other transaction has been inserted
(if a uniqueness
// conflict occurs, the transaction will be rolled back), then we can
consider that the
// fileset meta update is successful
+ int[] updateResultRef = new int[1];
SessionUtils.doMultipleWithCommit(
() ->
SessionUtils.doWithoutCommit(
FilesetVersionMapper.class,
mapper ->
mapper.insertFilesetVersions(newFilesetPO.getFilesetVersionPOs())),
() ->
- SessionUtils.doWithoutCommit(
+ updateResultRef[0] = SessionUtils.getWithoutCommit(
FilesetMetaMapper.class,
mapper -> mapper.updateFilesetMeta(newFilesetPO,
oldFilesetPO)));
- // we set the updateResult to 1 to indicate that the update is
successful
- updateResult = 1;
+ updateResult = updateResultRef[0];
Review Comment:
Changing to this actually helps nothing. If the update fails (update
nothing), we should rollback the above insert.
--
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]