yuqi1129 commented on issue #12969: URL: https://github.com/apache/gravitino/issues/12969#issuecomment-6464513436
The first part of this issue is no longer needed. CAS-miss classification now lives in `OccWriteSupport.writeFailure`, and every service routes its zero-row update through its own `xxxWriteFailure` helper, so a future classification fix is applied in one place. The remaining inline `if (updated == 0) throw ...` is the same three-line check as `updateWithVersion` and holds no logic of its own. Migrating the ~14 call sites would touch every OCC write path for no behavioural gain. `ModelVersionMetaService` also intentionally throws `concurrentModification` without a re-lookup, because the locked snapshot has already proven the version exists. Narrowing the scope to the second item: extract a shared metalake-by-name lookup that throws `NoSuchEntityException`. It is now duplicated in `CatalogMetaService`, `PolicyMetaService`, `RoleMetaService`, `TagMetaService`, `UserMetaService`, `GroupMetaService` and `MetalakeMetaService`. @LiJie20190102 feel free to take this narrowed scope; otherwise we can close it. -- 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]
