smaheshwar-pltr commented on code in PR #16796:
URL: https://github.com/apache/iceberg/pull/16796#discussion_r3406517400
##########
docs/docs/maintenance.md:
##########
@@ -78,6 +78,8 @@ Untracked metadata files are also deleted as part of [orphan
file deletion](#del
| write.metadata.delete-after-commit.enabled | false | Controls
whether to delete the oldest **tracked** version metadata files after each
table commit |
| write.metadata.previous-versions-max | 100 | The max
number of previous version metadata files to track
|
+Setting `write.metadata.previous-versions-max=0` keeps no previous metadata
files, so the `metadata-log` is always empty. With
`write.metadata.delete-after-commit.enabled=true`, the superseded metadata file
is deleted on every commit, leaving only the current metadata file; lowering
the property to `0` also deletes any files still tracked in the existing
`metadata-log` on the next commit. Metadata files that were already untracked
(for example, those written while
`write.metadata.delete-after-commit.enabled=false`) remain orphans and can only
be cleaned with an orphan file deletion procedure.
Review Comment:
```suggestion
Setting `write.metadata.previous-versions-max=0` keeps no previous metadata
files, so the `metadata-log` is always empty. With
`write.metadata.delete-after-commit.enabled=true`, the superseded metadata file
is deleted on every commit, leaving only the current metadata file; lowering
the property to `0` also deletes any files still tracked in the existing
`metadata-log` on the next commit.
```
--
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]