Copilot commented on code in PR #13611:
URL: https://github.com/apache/trafficserver/pull/13611#discussion_r3908602185


##########
src/proxy/http/HttpCacheSM.cc:
##########
@@ -230,7 +230,7 @@ HttpCacheSM::state_cache_open_write(int event, void *data)
     break;
 
   case CACHE_EVENT_OPEN_WRITE_FAILED: {
-    if 
(is_read_retry_write_fail_action(master_sm->t_state.txn_conf->cache_open_write_fail_action))
 {
+    if 
(is_read_retry_write_fail_action(master_sm->get_cache_open_write_fail_action()))
 {
       // fall back to open_read_tries

Review Comment:
   `get_cache_open_write_fail_action()` relies on `cache_sm.get_last_error()`, 
but in `CACHE_EVENT_OPEN_WRITE_FAILED` the `err_code` field is not set until 
the "done retrying" branch. That means `get_last_error()` can be stale here, so 
compatibility-mode DOC_BUSY handling may not trigger (or may trigger based on 
an unrelated earlier error). Capture the error code from `data` at the start of 
this case so the override logic sees the current failure reason.



-- 
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