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

Method scanUpdateDone

src/iocore/cache/CacheVC.cc:996–1018  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

994}
995
996int
997CacheVC::scanUpdateDone(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
998{
999 Dbg(dbg_ctl_cache_scan_truss, "inside %p:scanUpdateDone", this);
1000 cancel_trigger();
1001 // get volume lock
1002 CACHE_TRY_LOCK(lock, stripe->mutex, mutex->thread_holding);
1003 if (lock.is_locked()) {
1004 // insert a directory entry for the previous fragment
1005 dir_overwrite(&first_key, stripe, &dir, &od->first_dir, false);
1006 if (od->move_resident_alt) {
1007 dir_insert(&od->single_doc_key, stripe, &od->single_doc_dir);
1008 }
1009 ink_assert(stripe->open_read(&first_key));
1010 ink_assert(this->od);
1011 stripe->close_write(this);
1012 SET_HANDLER(&CacheVC::scanObject);
1013 return handleEvent(EVENT_IMMEDIATE, nullptr);
1014 } else {
1015 mutex->thread_holding->schedule_in_local(this, HRTIME_MSECONDS(cache_config_mutex_retry_delay));
1016 return EVENT_CONT;
1017 }
1018}
1019
1020// set_http_info must be called before do_io_write
1021// cluster vc does an optimization where it calls do_io_write() before

Callers

nothing calls this directly

Calls 5

dir_overwriteFunction · 0.85
dir_insertFunction · 0.85
schedule_in_localMethod · 0.80
open_readMethod · 0.45
close_writeMethod · 0.45

Tested by

no test coverage detected