mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-22 17:40:34 +00:00
Refs #9331 In segment::close() we add space to managers "wasted" counter. In destructor, if we can cleanly delete/recycle the file we remove it. However, if we never went through close (shutdown - ok, exception in batch_cycle - not ok), we can end up subtracting numbers that were never added in the first place. Just keep track of the bytes added in a var. Observed behaviour in above issue is timeouts in batch_cycle, where we declare the segment closed early (because we cannot add anything more safely - chunks could get partial/misplaced). Exception will propagate to caller(s), but the segment will not go through actual close() call -> destructor should not assume such. Closes #9598
100 KiB
100 KiB