roryqi commented on PR #12404: URL: https://github.com/apache/gravitino/pull/12404#issuecomment-5538902539
I don't think documenting the remaining window is sufficient for a PR intended to fix #12403. The lease is released when the dispatcher callback returns, but connector-backed objects continue to escape and are consumed afterward. `EntityCombinedTable`, for example, still delegates its getters to the original connector `Table`, so invalidation can retire the wrapper before post-processing or REST DTO conversion completes. Could we simplify the design by keeping leases internal to `CatalogManager`, exposing one callback-based operation API, acquiring once per top-level dispatcher operation, and converting connector results into detached snapshots before releasing the lease? This would also let capability/property lookups reuse the same wrapper and remove most direct `CatalogLease` usage. Separately, making cache lookup/load/acquire atomic per key would avoid the arbitrary five-attempt retry loop, and the unleased `loadCatalogAndWrap` API should not remain a normal public access path. -- 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]
