MCPcopy Create free account
hub / github.com/apple/foundationdb / ~DatabaseContext

Method ~DatabaseContext

fdbclient/NativeAPI.actor.cpp:1804–1827  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1802}
1803
1804DatabaseContext::~DatabaseContext() {
1805 cacheListMonitor.cancel();
1806 clientDBInfoMonitor.cancel();
1807 monitorTssInfoChange.cancel();
1808 tssMismatchHandler.cancel();
1809 if (grvUpdateHandler.isValid()) {
1810 grvUpdateHandler.cancel();
1811 }
1812 if (sharedStatePtr) {
1813 sharedStatePtr->delRef(sharedStatePtr);
1814 }
1815 for (auto it = server_interf.begin(); it != server_interf.end(); it = server_interf.erase(it))
1816 it->second->notifyContextDestroyed();
1817 ASSERT_ABORT(server_interf.empty());
1818 locationCache.insert(allKeys, Reference<LocationInfo>());
1819 for (auto& it : notAtLatestChangeFeeds) {
1820 it.second->context = nullptr;
1821 }
1822 for (auto& it : changeFeedUpdaters) {
1823 it.second->context = nullptr;
1824 }
1825
1826 TraceEvent("DatabaseContextDestructed", dbId).backtrace();
1827}
1828
1829Optional<KeyRangeLocationInfo> DatabaseContext::getCachedLocation(const Optional<TenantNameRef>& tenantName,
1830 const KeyRef& key,

Callers

nothing calls this directly

Calls 9

TraceEventClass · 0.85
cancelMethod · 0.65
isValidMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45
emptyMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected