Skip to content

IcebergCatalogAdapter: close underlying catalog consistently #1224

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

Merged
merged 1 commit into from
Mar 20, 2025

Conversation

adutra
Copy link
Contributor

@adutra adutra commented Mar 20, 2025

With the revert of b84f462 by ccf25df, we lost an extra benefit that was included in the reverted commit: a fix for the fact that IcebergCatalogHandlerWrapper does not always close its underlying Catalog, thus relying on CallContext to play the role of the "sweeper car" and close everything that was left unclosed at the end of the request processing.

This PR re-applies that fix again.

If this change gets accepted, we could envisage removing CallContext.closeables() – as the main purpose of this method is to close unclosed catalogs.

With the revert of #b84f4624db8d0bd5b8920b0df719bcc15666008f by #ccf25df7b055e9d232b88a3f6fe8b4e0a2ab035a, we lost an extra benefit that was included in that change: a fix for the fact that IcebergCatalogHandlerWrapper does not always close its underlying `Catalog`, thus relying on `CallContext` to play the role of the "sweep vehicle" and close everything that was left unclosed at the end of the request processing.

This PR re-applies that fix again.
@github-project-automation github-project-automation bot moved this from PRs In Progress to Ready to merge in Basic Kanban Board Mar 20, 2025
@snazy
Copy link
Member

snazy commented Mar 20, 2025

Related to #563

@eric-maynard
Copy link
Contributor

Good find! I remember noting that we were losing this during the revert but I didn't think / remember to pick it back up after the revert. I like the idea of removing CallContext.closeables, though if we improve things by having the container manage the lifecycle of CallContext & those closeables I think we should do that first.

@eric-maynard eric-maynard merged commit a8cecc3 into apache:main Mar 20, 2025
5 checks passed
@github-project-automation github-project-automation bot moved this from Ready to merge to Done in Basic Kanban Board Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants