MCPcopy Create free account
hub / github.com/apache/kudu / LookupEntryByIdFastPath

Method LookupEntryByIdFastPath

src/kudu/client/meta_cache.cc:1328–1341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1326}
1327
1328bool MetaCache::LookupEntryByIdFastPath(const string& tablet_id,
1329 MetaCacheEntry* entry) {
1330 SCOPED_LOG_SLOW_EXECUTION(WARNING, 50, "looking up entry by ID");
1331 shared_lock<rw_spinlock> l(lock_.get_lock());
1332 const auto* cache_entry = FindOrNull(entry_by_tablet_id_, tablet_id);
1333 if (PREDICT_FALSE(!cache_entry)) {
1334 return false;
1335 }
1336 if (cache_entry->stale()) {
1337 return false;
1338 }
1339 *entry = *cache_entry;
1340 return true;
1341}
1342
1343Status MetaCache::DoFastPathLookupById(const string& tablet_id,
1344 scoped_refptr<RemoteTablet>* remote_tablet) {

Callers 1

TEST_FFunction · 0.80

Calls 3

FindOrNullFunction · 0.85
staleMethod · 0.80
get_lockMethod · 0.45

Tested by 1

TEST_FFunction · 0.64