lsa: Mark compact_segment_locked() as noexcept

We cannot recover from a failure in this method. The implementation
makes sure it never happens. Invariants will be broken if this
throws. Detect violations early by marking as noexcept.

We could make it exception safe and try to leave the data structures
in a consistent state but the reclaimer cannot make progress if this throws, so
it's pointless.

Refs #9192
Message-Id: <20211116122019.813418-1-tgrabiec@scylladb.com>
This commit is contained in:
Tomasz Grabiec
2021-11-16 13:20:19 +01:00
committed by Avi Kivity
parent a62631d441
commit 4d627affc3

View File

@@ -1457,7 +1457,7 @@ private:
}
}
void compact_segment_locked(segment* seg, segment_descriptor& desc) {
void compact_segment_locked(segment* seg, segment_descriptor& desc) noexcept {
auto seg_occupancy = desc.occupancy();
llogger.debug("Compacting segment {} from region {}, {}", fmt::ptr(seg), id(), seg_occupancy);