Repository navigation
deps: move the compactor to iceberg-go v0.8.0 - #173
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | -25 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
bonesmoses
left a comment
There was a problem hiding this comment.
Not critical, but I recommend adding a note to the changelog that compaction or snapshot expiry has a new retry loop.
Otherwise approved.
Summary
Moves the compactor's Go module (
cmd/compactor) to iceberg-go v0.8.0, arrow-go v18.9.0 and pgx v5.13.0, the pgx version the archiver already uses. iceberg-go v0.8.0 does two jobs that the compactor did with its own code, so that code is removed:cmd/compactor/flatwalk.golisted the table directory for orphan cleanup with one flat object list, because iceberg-go v0.7.0's directory walk failed withreaddir: not implementedwhen an object sat at a directory path. The compactor now calls iceberg-go'smaintenance.DeleteOrphanFiles, whose walk handles that object and lists under the table directory with a trailing slash, as vended credentials require.cmd/compactor/compact.goread each group of a table withcoldfront.sort-keyinto memory, sorted it on that column and wrote it back. The compactor now passes a sort order to iceberg-go'stable.ExecuteCompactionGroup(table.WithCompactionSortOrder), which sorts each group ascending with nulls last and keeps equal keys in read order, as the removed code did.The compactor's non-test Go code loses 283 lines and gains 24.
Two behaviours change:
--orphansrefuses a table whosegc.enabledproperty isfalse, as--expire-snapshotsalready does. ColdFront does not set the property.The pull request also adds the changelog entry and a test for #170, a compaction that rewrites a data file larger than 128 MiB.
Checklist
./run-ci-local.shpasses (gofmt, golangci-lint, shellcheck, hadolint,actionlint, build, pg_regress, journey).
section explains why it has none.
extension/coldfront/test/, orthe Testing section explains why it has none.
(
ci/journey.shand the CI matrix).README.mdanddocs/, or the Notes for Reviewersexplain why it needs no update.
impact.
TLC (
docs/formal/).Testing
cmd/compactor, each written before the code it covers:delete data file paths must be uniqueat the other.ci/journey.shruns compaction, the sorted rewrite, snapshot expiry and orphan deletion against Lakekeeper, and its stories pass unchanged. The orphan dry run in TC-133 reports the same candidate files on both versions. Thevendedbackend runs orphan deletion under SeaweedFS STS credentials.Risk
aws-vendedandazure-vendedlanes, which run it against AWS S3 and Azure ADLS Gen2, onmainalone, so they first run it on the merge commit.How to Revert
Revert the merge commit and rebuild the compactor.
cmd/compactor/go.modreturns to iceberg-go v0.7.0. Tables that this version compacted stay valid, because each run commits an ordinary Iceberg rewrite or expiry snapshot.Notes for Reviewers
README.mdneeds no update: it names no iceberg-go version.