-
Notifications
You must be signed in to change notification settings - Fork 918
[#12345] improvement(core): add OCC for table writes #12551
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 10 commits
791f5e9
0192405
7011c5d
cc97151
ce9eb5d
23d0f3c
14a737e
60649b9
57d8513
ed8d3e2
c763996
43ed77d
81e19f4
1d874db
5376053
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,6 +35,7 @@ | |
| import org.apache.gravitino.connector.PropertiesMetadata; | ||
| import org.apache.gravitino.connector.capability.Capability; | ||
| import org.apache.gravitino.exceptions.NoSuchEntityException; | ||
| import org.apache.gravitino.exceptions.OptimisticLockException; | ||
| import org.apache.gravitino.file.FilesetChange; | ||
| import org.apache.gravitino.messaging.TopicChange; | ||
| import org.apache.gravitino.rel.SupportsPartitions; | ||
|
|
@@ -219,6 +220,9 @@ protected <R extends HasIdentifier> R operateOnEntity( | |
| R ret = null; | ||
| try { | ||
| ret = fn.apply(ident); | ||
| } catch (OptimisticLockException e) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Altitude: this special case depends on an unenforced fact about callers. The comment concedes
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. see above. |
||
| // A version conflict is actionable: the caller must retry against the latest entity. | ||
| throw e; | ||
|
yuqi1129 marked this conversation as resolved.
Outdated
|
||
| } catch (NoSuchEntityException e) { | ||
| // Case 2: The table is created by Gravitino, but has no corresponding entity in Gravitino. | ||
| LOG.error(FormattedErrorMessages.ENTITY_NOT_FOUND, ident); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.