Copilot commented on code in PR #13881:
URL: https://github.com/apache/trafficserver/pull/13881#discussion_r4339191539
##########
src/iocore/aio/AIO.cc:
##########
@@ -99,10 +99,10 @@ AIOCallback::io_complete(int event, void *data)
// Take this lock in-line because we want to stop other I/O operations on
this disk ASAP
SCOPED_MUTEX_LOCK(lock, aio_err_callback->mutex, this_ethread());
- err_op->action.continuation->handleEvent(EVENT_NONE, err_op);
+ err_op->action.call_back(EVENT_NONE, err_op);
}
- if (!action.cancelled && action.continuation) {
- action.continuation->handleEvent(AIO_EVENT_DONE, this);
+ if (action.continuation) {
+ action.call_back(AIO_EVENT_DONE, this);
}
Review Comment:
Switching the error callback path to `err_op->action.call_back(...)`
introduces a new behavior: if `err_op->action` is cancelled, the continuation
will not be invoked. If the continuation previously performed essential
cleanup/ownership handling for `err_op`, this can leak or leave the error
operation unprocessed. Handle the empty return case from `call_back` for
`err_op` (or otherwise ensure `err_op` is cleaned up when cancelled) so
cancellation doesn’t skip required disposal logic.
--
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]