| 1802 | } |
| 1803 | |
| 1804 | DatabaseContext::~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 | |
| 1829 | Optional<KeyRangeLocationInfo> DatabaseContext::getCachedLocation(const Optional<TenantNameRef>& tenantName, |
| 1830 | const KeyRef& key, |
nothing calls this directly
no test coverage detected