Skip to content

Commit

Permalink
Merge pull request #24 from solarisdb/fix_delete_empty_chunk_error
Browse files Browse the repository at this point in the history
fix a wrong attemp of deleting a non empty chunk
  • Loading branch information
trtlmn committed Apr 25, 2024
2 parents 1ad4278 + be28698 commit e0df870
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/storage/logfs/locallog.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ func (l *localLog) AppendRecords(ctx context.Context, request *solaris.AppendRec
cis = append(cis, ci)
recs = recs[arr.Written:]
added += arr.Written
ci.ID = ""
} else if ci.RecordsCount == 0 {
// the chunk was just created and its capacity is not enough to write at least one record!
gerr = fmt.Errorf("it seems the maximum chunk size is less than the record size payload=%d: %w", len(recs[0].Payload), errors.ErrInvalid)
Expand Down

0 comments on commit e0df870

Please sign in to comment.