MCPcopy Create free account
hub / github.com/ByConity/ByConity / checkAndReturnReservation

Function checkAndReturnReservation

src/MergeTreeCommon/MergeTreeMetaBase.cpp:1218–1224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1216{
1217
1218inline ReservationPtr checkAndReturnReservation(UInt64 expected_size, ReservationPtr reservation)
1219{
1220 if (reservation)
1221 return reservation;
1222
1223 throw Exception(fmt::format("Cannot reserve {}, not enough space", ReadableSize(expected_size)), ErrorCodes::NOT_ENOUGH_SPACE);
1224}
1225
1226}
1227

Callers 2

reserveSpaceMethod · 0.85

Calls 2

ReadableSizeClass · 0.85
ExceptionClass · 0.50

Tested by

no test coverage detected