You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2023/01/25 23:31:41 UTC
[trafficserver] branch 9.2.x updated: s3_auth: Fix assertion failure of TSActionCancel (#9329)
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch 9.2.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/9.2.x by this push:
new 259ca6b59 s3_auth: Fix assertion failure of TSActionCancel (#9329)
259ca6b59 is described below
commit 259ca6b599367da60618768e345252d33b45d2b5
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Thu Jan 26 07:35:16 2023 +0900
s3_auth: Fix assertion failure of TSActionCancel (#9329)
(cherry picked from commit 6ec45d5f0746af8283b55c8ab27581b072438703)
---
plugins/s3_auth/s3_auth.cc | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/plugins/s3_auth/s3_auth.cc b/plugins/s3_auth/s3_auth.cc
index 20984c049..b67c8cad1 100644
--- a/plugins/s3_auth/s3_auth.cc
+++ b/plugins/s3_auth/s3_auth.cc
@@ -491,6 +491,18 @@ public:
_conf_rld_act = TSContScheduleOnPool(_conf_rld, delay * 1000, TS_THREAD_POOL_TASK);
}
+ /**
+ Clear _conf_rld_act if the event handler is handling the action
+ */
+ void
+ check_current_action(void *edata)
+ {
+ // Following what's TSContScheduleOnPool does before returning TSAction
+ if (_conf_rld_act == ((TSAction)((uintptr_t)edata | 0x1))) {
+ _conf_rld_act = nullptr;
+ }
+ }
+
ts::shared_mutex reload_mutex;
private:
@@ -1049,6 +1061,7 @@ config_reloader(TSCont cont, TSEvent event, void *edata)
{
std::unique_lock lock(s3->reload_mutex);
s3->copy_changes_from(file_config);
+ s3->check_current_action(edata);
}
if (s3->expiration() == 0) {