Skip to content

fix: correct error logic for writing empty index files#27123

Merged
davidby-influx merged 1 commit intomaster-1.xfrom
DSB/fix_delete_tsm
Jan 14, 2026
Merged

fix: correct error logic for writing empty index files#27123
davidby-influx merged 1 commit intomaster-1.xfrom
DSB/fix_delete_tsm

Conversation

@davidby-influx
Copy link
Copy Markdown
Contributor

// Write index & close.
// It is okay to have no index values if no block was written
if err := w.WriteIndex(); err != nil && !(blockWritten || errors.Is(err, tsm1.ErrNoValues)) {
if err := w.WriteIndex(); err != nil && !(errors.Is(err, tsm1.ErrNoValues) && !blockWritten) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This makes a lot more sense!

Copy link
Copy Markdown
Member

@gwossum gwossum left a comment

Choose a reason for hiding this comment

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

LGTM

@davidby-influx davidby-influx merged commit e5293b7 into master-1.x Jan 14, 2026
9 checks passed
@davidby-influx davidby-influx deleted the DSB/fix_delete_tsm branch January 14, 2026 23:52
davidby-influx added a commit that referenced this pull request Jan 14, 2026
davidby-influx added a commit that referenced this pull request Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants