• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

nats-io / nats-server / 20087658921 / 1
85%
main: 85%

Build:
DEFAULT BRANCH: main
Ran 10 Dec 2025 05:53AM UTC
Files 61
Run time 3s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

09 Dec 2025 02:35PM UTC coverage: 84.763% (+0.07%) from 84.691%
20087658921.1

push

github

web-flow
[FIXED] Filestore compaction issues (#7627)

This PR fixes a couple issues relating to `Compact(seq)`:
1. If an (almost) empty stream would be compacted or purged to `seq=2`
and the server would be hard killed after, it would not have written a
tombstone to recover this sequence from.
2. A particular sequence of `SkipMsg(seq)`, `Compact(seq)`,
`SkipMsg(seq+1)` would preserve the block and tombstones after the
compact, but the subsequent `SkipMsg(seq+1)` on the empty block would
see the server starting to overwrite block data at the head of the file.
Reading that file from disk afterward would appear corrupted and log:
`indexCacheBuf corrupt record state`.
3. Compaction of a block that would allow to reclaim over half of the
storage size taken up by the file would overwrite the file in place.
This could lose messages if the server was hard killed after the file
truncation, but before it fully wrote the compacted bytes. We now write
the file separately and rename it to overwrite the original file
atomically.

Signed-off-by: Maurice van Veen <github@mauricevanveen.com>

74120 of 87444 relevant lines covered (84.76%)

359268.04 hits per line

Source Files on job 20087658921.1
  • Tree
  • List 61
  • Changed 20
  • Source Changed 1
  • Coverage Changed 20
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 20087658921
  • 2e882d1c on github
  • Prev Job for on main (#20052263983.1)
  • Next Job for on main (#20122323441.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc