Fix stale in-memory catalog state after an Iceberg ALTER#1112
Fix stale in-memory catalog state after an Iceberg ALTER#1112NiclasHaderer wants to merge 1 commit into
Conversation
|
I guess this is to update the information schema immediately after an alter? Otherwise any read afterwards will do the same correct? |
|
Sorry, yeah that is what this is fixing. Im currently contemplating if I should instead trigger a refetch from the rest server to get the newest metadata. What do you think? Edit: I think we should be able to reuse the response of the commit even... |
|
I'm not sure I like this fix I'd be much more inclined to just reset the state, so that it can be populated the next time it's scanned |
|
I'm also wondering what the performance improvement is here. Unless Is there a specific use case where we really need to prevent the extra round trip? |
After an Iceberg
ALTER(e.g.ADD COLUMN) or table rename is committed, the catalog left the oldIcebergTableInformationinschema.tables. A scan in the same connection then read the pre-ALTER schema.This refreshes the published table info on commit and swaps it into the schema under the entry lock, for both ALTER and rename, so subsequent reads see the committed schema.