MCPcopy Create free account
hub / github.com/apache/trafficserver / RecGetRecordSource

Function RecGetRecordSource

src/records/RecCore.cc:681–704  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

679}
680
681RecErrT
682RecGetRecordSource(const char *name, RecSourceT *source, bool lock)
683{
684 RecErrT err = REC_ERR_FAIL;
685
686 if (lock) {
687 ink_rwlock_rdlock(&g_records_rwlock);
688 }
689
690 if (auto it = g_records_ht.find(name); it != g_records_ht.end()) {
691 RecRecord *r = it->second;
692
693 rec_mutex_acquire(&(r->lock));
694 *source = r->config_meta.source;
695 err = REC_ERR_OKAY;
696 rec_mutex_release(&(r->lock));
697 }
698
699 if (lock) {
700 ink_rwlock_unlock(&g_records_rwlock);
701 }
702
703 return err;
704}
705
706//-------------------------------------------------------------------------
707// RecRegisterStat

Callers 2

TSMgmtSourceGetFunction · 0.85

Calls 6

ink_rwlock_rdlockFunction · 0.85
rec_mutex_acquireFunction · 0.85
rec_mutex_releaseFunction · 0.85
ink_rwlock_unlockFunction · 0.85
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected