JosiahWI commented on code in PR #13927:
URL: https://github.com/apache/trafficserver/pull/13927#discussion_r4516854502


##########
src/iocore/cache/CacheVC.cc:
##########
@@ -973,11 +976,17 @@ CacheVC::scanOpenWrite(int /* event ATS_UNUSED */, Event 
* /* e ATS_UNUSED */)
 {
   Dbg(dbg_ctl_cache_scan_truss, "inside %p:scanOpenWrite", this);
   cancel_trigger();
+  if (_action.cancelled) {
+    return free_CacheVC(this);
+  }
   // get volume lock
   if (writer_lock_retry > SCAN_WRITER_LOCK_MAX_RETRY) {
-    int r = 
_action.continuation->handleEvent(CACHE_EVENT_SCAN_OPERATION_BLOCKED, nullptr);
+    auto r = _action.call_back(CACHE_EVENT_SCAN_OPERATION_BLOCKED, nullptr);
     Dbg(dbg_ctl_cache_scan, "still haven't got the writer lock, asking 
user..");
-    switch (r) {
+    if (!r) {
+      return free_CacheVC(this);
+    }

Review Comment:
   Is this the path that still calls back `_action` if it is cancelled while 
handling `CACHE_EVENT_SCAN_OPERATION_BLOCKED`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to