MCPcopy Create free account
hub / github.com/apache/impala / get_reference

Method get_reference

be/src/util/cache/lirs-cache.cc:286–295  ·  view source on GitHub ↗

The caller must be holding the mutex_.

Source from the content-addressed store, hash-verified

284
285 // The caller must be holding the mutex_.
286 void get_reference() {
287 modify_atomic_state([](AtomicState& cur_state) {
288 // Check whether the reference count would wrap. There is no use case that
289 // currently needs to exceed 65k concurrent references, and this is likely
290 // to be a bug in the caller's code. For now, this asserts, but there may be
291 // a better behavior if needed.
292 CHECK_LT(cur_state.ref_count, std::numeric_limits<uint16_t>::max());
293 ++cur_state.ref_count;
294 });
295 }
296};
297
298struct LIRSThreadState {

Callers 3

LookupMethod · 0.80
InsertMethod · 0.80
DumpMethod · 0.80

Calls 1

maxFunction · 0.85

Tested by

no test coverage detected