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

Method Dump

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

Source from the content-addressed store, hash-verified

1142}
1143
1144vector<HandleBase*> LIRSCacheShard::Dump() {
1145 DCHECK(initialized_);
1146 std::lock_guard<MutexType> l(mutex_);
1147
1148 // For LIRS cache we only collect resident entries (i.e. PROTECTED/UNPROTECTED entries),
1149 // and ignore entries that are not resident (i.e. TOMBSTONE entries).
1150 vector<HandleBase*> handles;
1151
1152 for (LIRSHandle& h : recency_list_) {
1153 // First walk through 'recency_list_', only collecting PROTECTED entries, ignoring
1154 // the UNPROTECTED/TOMBSTONE entries. UNPROTECTED entries will be collected later from
1155 // the unprotected_tombstone_list_.
1156 if (h.state() == PROTECTED) {
1157 h.get_reference();
1158 handles.push_back(&h);
1159 }
1160 }
1161
1162 if (unprotected_list_front_ != nullptr) {
1163 DCHECK(unprotected_list_front_->unprotected_tombstone_list_hook_.is_linked());
1164 // From 'unprotected_list_front_' to the end of 'unprotected_tombstone_list_' are all
1165 // UNPROTECTED entries, collecting them all.
1166 auto iter = unprotected_tombstone_list_.iterator_to(*unprotected_list_front_);
1167 while (iter != unprotected_tombstone_list_.end()) {
1168 iter->get_reference();
1169 handles.push_back(&*iter);
1170 ++iter;
1171 }
1172 }
1173
1174 return handles;
1175}
1176
1177} // end anonymous namespace
1178

Callers

nothing calls this directly

Calls 4

get_referenceMethod · 0.80
push_backMethod · 0.80
stateMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected