Copilot commented on code in PR #13114:
URL: https://github.com/apache/trafficserver/pull/13114#discussion_r3222607595
##########
src/proxy/http/HttpSM.cc:
##########
@@ -7706,6 +7742,16 @@ HttpSM::kill_this()
// we must check it again
if (kill_this_async_done == true) {
pending_action = nullptr;
+
+ // This should only be a last-resort cleanup path. A background fill is
+ // normally driven to COMPLETED or ABORTED by tunnel_handler_server, but
+ // any unexpected teardown must still balance the active fill gauge before
+ // optional stats/logging run.
+ if (background_fill == BackgroundFill_t::STARTED) {
+ background_fill = BackgroundFill_t::ABORTED;
+ Metrics::Gauge::decrement(http_rsb.background_fill_current_count);
+ }
Review Comment:
PR description says this change also folds BackgroundFill_t::STARTED into
the ABORTED handling in HttpTransact::update_size_and_time_stats, but that
function still asserts on STARTED (HttpTransact.cc:8971-8974). Either update
the PR description or add the described defensive handling to avoid future
crashes if STARTED ever reaches the stats helper again.
--
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]