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

Method open_done

src/iocore/cache/Cache.cc:217–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

215}
216
217int
218Cache::open_done()
219{
220 Action *register_ShowCache(Continuation * c, HTTPHdr * h);
221 Action *register_ShowCacheInternal(Continuation * c, HTTPHdr * h);
222
223 if (total_good_nvol == 0) {
224 ready = CACHE_INIT_FAILED;
225 cacheProcessor.cacheInitialized();
226 return 0;
227 }
228
229 {
230 CacheHostTable *hosttable_raw = new CacheHostTable(this, scheme);
231 hosttable.reset(hosttable_raw);
232 hosttable_raw->register_config_callback(&hosttable);
233 }
234
235 ReplaceablePtr<CacheHostTable>::ScopedReader hosttable(&this->hosttable);
236 if (hosttable->gen_host_rec.num_cachevols == 0) {
237 ready = CACHE_INIT_FAILED;
238 } else {
239 ready = CACHE_INITIALIZED;
240 }
241
242 // TS-3848
243 if (ready == CACHE_INIT_FAILED && cacheProcessor.waitForCache() >= 2) {
244 Emergency("Failed to initialize cache host table");
245 }
246
247 cacheProcessor.cacheInitialized();
248
249 return 0;
250}
251
252int
253Cache::open(bool clear, bool /* fix ATS_UNUSED */)

Callers

nothing calls this directly

Calls 4

cacheInitializedMethod · 0.80
waitForCacheMethod · 0.80
resetMethod · 0.45

Tested by

no test coverage detected