Skip to content

Comments

fix: get next_sstable_id#544

Merged
ethe merged 7 commits intotonbo-io:devfrom
jobala:DEV-502
Jan 26, 2026
Merged

fix: get next_sstable_id#544
ethe merged 7 commits intotonbo-io:devfrom
jobala:DEV-502

Conversation

@jobala
Copy link
Contributor

@jobala jobala commented Dec 20, 2025

Summary

  • checks through all versions to get the next sstable id.

closes #541

Copy link
Member

@ethe ethe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix only scans all versions when latest_version is None or has empty SSTs. If latest version has SSTs, it only uses those. This works under the assumption that SST IDs are always monotonically increasing, so the latest version's SSTs will always have IDs >= any older version's SSTs. This assumption holds for normal operation. This fits the expectation of #541, thank you @jobala !

Please consider adding a regression test to tests/ directory that covers this specific scenario to prevent future regressions.

@jobala jobala requested a review from ethe December 26, 2025 18:11
@jobala
Copy link
Contributor Author

jobala commented Dec 27, 2025

Thanks for reviewing @ethe, I have added tests.

@ethe
Copy link
Member

ethe commented Jan 26, 2026

Looks good to me! Thank you @jobala

@ethe ethe enabled auto-merge (squash) January 26, 2026 13:30
@ethe ethe merged commit 3ef8604 into tonbo-io:dev Jan 26, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Minor compaction start_id can reuse existing SST ids when latest manifest version is empty

2 participants