tanmayrauth commented on PR #1430:
URL: https://github.com/apache/iceberg-go/pull/1430#issuecomment-4985643661
Fixed it, and it turned out to be broader than the two paths you flagged,
so I swept every reporter-resolution site while I was in there. Hadoop
CreateTable and Glue CreateTable/RegisterTable now resolve the reporter before
the metadata/version-hint write and the Glue entry; the same after-mutation
shape existed in Hive CreateTable, SQL CreateTable, and REST
CreateTable/RegisterTable (all resolved the reporter only through a trailing
LoadTable/tableFromResponse), and those are fixed the same way. The paths that
were already safe I left alone — Hive RegisterTable resolves before
client.CreateTable, Glue/SQL CommitTable resolve during the pre-mutation load
of the current table, and Hive/REST CommitTable are metadata-only. I went with
resolve-before-mutation everywhere rather than your "once at construction"
alternative because glue.NewCatalog and hive.NewCatalogWithClient don't return
an error, so a bad metrics-reporter-impl can't be surfaced at construction
there; CachedReporter
still caches the first Get, so the trailing call just reuses it with no
double resolution. Added tests covering create-with-invalid-reporter leaving no
partial state (Hadoop/SQL assert the table doesn't exist afterward, Hive
asserts the metastore client is never called, REST asserts the create POST is
never sent), and rebased on latest main.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]