You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "astronautas (via GitHub)" <gi...@apache.org> on 2026/02/12 12:40:28 UTC

[I] metadata-log in metadata.json references missing files (some suddenly gone), metadata cleanup fails, files accumulate [iceberg]

astronautas opened a new issue, #15306:
URL: https://github.com/apache/iceberg/issues/15306

   ### Apache Iceberg version
   
   None
   
   ### Query engine
   
   None
   
   ### Please describe the bug 🐞
   
   Hey,
   
   We are experimenting with Spark 4 and Iceberg 1.10.1 setup. We noticed a peculiar issue. We tried to activate `write.metadata.delete-after-commit.enabled=true` for one of our tables to make sure metadata-log entry does infinitely grow. It unfortunately failed, with 500. Apparently the latest metadata.json.metadata-log references some metadata.json files that are no more on cloud storage.
   
   We have exhausted the options of trying to find-out why the file got deleted. It is rather unfortunate that we cannot remove old metadata now since this file is missing. Maybe we're incorrectly running `write.metadata.delete-after-commit.enabled`?
   
   ### Willingness to contribute
   
   - [ ] I can contribute a fix for this bug independently
   - [ ] I would be willing to contribute a fix for this bug with guidance from the Iceberg community
   - [ ] I cannot contribute a fix for this bug at this time


-- 
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: issues-unsubscribe@iceberg.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] metadata file suddenly gone, still referenced by metadata.log, metadata delete cleanup fails [iceberg]

Posted by "astronautas (via GitHub)" <gi...@apache.org>.
astronautas commented on issue #15306:
URL: https://github.com/apache/iceberg/issues/15306#issuecomment-3891109049

   tl;dr - I am just guessing the reasons of that old metadata file gone, but it's annoying we can't clean them up just because the file is referenced by metadata-log, but not existing on gcs anymore...


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] old metadata.json file suddenly gone, still referenced by metadata.log, metadata delete cleanup fails [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #15306:
URL: https://github.com/apache/iceberg/issues/15306#issuecomment-5433209291

   This issue has been closed because it has not received any activity in the last 14 days since being marked as 'stale'


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] metadata file suddenly gone, still referenced by metadata.log, metadata delete cleanup fails [iceberg]

Posted by "astronautas (via GitHub)" <gi...@apache.org>.
astronautas commented on issue #15306:
URL: https://github.com/apache/iceberg/issues/15306#issuecomment-3890769662

   @RussellSpitzer Maybe we just misused something, but I don't see any other way apart from recreating the table from scratch :/.


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] old metadata.json file suddenly gone, still referenced by metadata.log, metadata delete cleanup fails [iceberg]

Posted by "RussellSpitzer (via GitHub)" <gi...@apache.org>.
RussellSpitzer commented on issue #15306:
URL: https://github.com/apache/iceberg/issues/15306#issuecomment-3893073015

   Also is the metadata.log not being kept to it's max length? That's a separate property I thought


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] old metadata.json file suddenly gone, still referenced by metadata.log, metadata delete cleanup fails [iceberg]

Posted by "astronautas (via GitHub)" <gi...@apache.org>.
astronautas commented on issue #15306:
URL: https://github.com/apache/iceberg/issues/15306#issuecomment-3895348050

   > That's interesting, I don't think I've ever seen this behavior before. Do
   > you have any more details about your writers? How many are there? What
   > other code might be running? Are you using S3?
   > […](#)
   
   We use GCS. We have roughly 2 writers per table. One writing hourly, upserting to a daily partition (so sort of always compacting itself). The other writer is the maintenance job - just doing classic 5 maintenance ops like compaction, rewrite_data_files, etc.
   
   Metadata.log not being kept to its max length is a separate property. Will paste some "evidence".
   
   


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] metadata file suddenly gone, still referenced by metadata.log, metadata delete cleanup fails [iceberg]

Posted by "astronautas (via GitHub)" <gi...@apache.org>.
astronautas commented on issue #15306:
URL: https://github.com/apache/iceberg/issues/15306#issuecomment-3891070153

   An example weird case:
   
   ❯ gsutil ls gs://<redacted>/00525-697cf45b-0000-2b35-862e-f40304363852.metadata.json
   /<redacted>/00525-697cf45b-0000-2b35-862e-f40304363852.metadata.json
   ❯ gsutil ls gs://<redacted>/00525-697cf45b-0000-2b35-862e-f40304363852.metadata.json
   gsutil ls gs://<redacted>/00525-697cf45b-0000-2b35-862e-f40304363852.metadata.json
   ❯ gsutil ls gs://<redacted>/00525-697cf45b-0000-2b35-862e-f40304363852.metadata.json
   CommandException: One or more URLs matched no objects.
   ❯ gsutil ls gs://<redacted>/00525-697cf45b-0000-2b35-862e-f40304363852.metadata.json
   
   While the alter table to add the write delete commit flag was running. As if the file got deleted by the cleanup process, but then referenced once more and throws 500, because the file is not there anymore. Eventual consistency of GCP? 🤔 Or some other issue.
   
   


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] old metadata.json file suddenly gone, still referenced by metadata.log, metadata delete cleanup fails [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #15306:
URL: https://github.com/apache/iceberg/issues/15306#issuecomment-5274347328

   This issue has been automatically marked as stale because it has been open for 180 days with no activity. It will be closed in next 14 days if no further activity occurs. To permanently prevent this issue from being considered stale, add the label 'not-stale', but commenting on the issue is preferred when possible.


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] old metadata.json file suddenly gone, still referenced by metadata.log, metadata delete cleanup fails [iceberg]

Posted by "RussellSpitzer (via GitHub)" <gi...@apache.org>.
RussellSpitzer commented on issue #15306:
URL: https://github.com/apache/iceberg/issues/15306#issuecomment-3893033376

   That's interesting, I don't think I've ever seen this behavior before. Do
   you have any more details about your writers? How many are there? What
   other code might be running? Are you using S3?
   
   On Thu, Feb 12, 2026 at 4:40 AM Lukas Valatka ***@***.***>
   wrote:
   
   > *astronautas* created an issue (apache/iceberg#15306)
   > <https://github.com/apache/iceberg/issues/15306>
   > Apache Iceberg version
   >
   > 1.10.1
   > Query engine
   >
   > Spark > 4
   > Please describe the bug 🐞
   >
   > Hey,
   >
   > We are experimenting with Spark 4 and Iceberg 1.10.1 setup. We noticed a
   > peculiar issue. We tried to activate
   > write.metadata.delete-after-commit.enabled=true for one of our tables to
   > make sure metadata-log entry does infinitely grow. It unfortunately failed,
   > with 500. Apparently the latest metadata.json.metadata-log references some
   > metadata.json files that are no more on cloud storage.
   >
   > We have exhausted the options of trying to find-out why the file got
   > deleted. It is rather unfortunate that we cannot remove old metadata now
   > since this file is missing. Maybe we're incorrectly running
   > write.metadata.delete-after-commit.enabled?
   > Willingness to contribute
   >
   >    - I can contribute a fix for this bug independently
   >    - I would be willing to contribute a fix for this bug with guidance
   >    from the Iceberg community
   >    - I cannot contribute a fix for this bug at this time
   >
   > —
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/iceberg/issues/15306>, or unsubscribe
   > <https://github.com/notifications/unsubscribe-auth/AADE2YMDT2V6VBR6FVQDUY34LRYE7AVCNFSM6AAAAACU4ODIH2VHI2DSMVQWIX3LMV43ASLTON2WKOZTHEZTCNRVHE2DINY>
   > .
   > You are receiving this because you are subscribed to this thread.Message
   > ID: ***@***.***>
   >
   


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] old metadata.json file suddenly gone, still referenced by metadata.log, metadata delete cleanup fails [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #15306: old metadata.json file suddenly gone, still referenced by metadata.log, metadata delete cleanup fails
URL: https://github.com/apache/iceberg/issues/15306


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org