Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions plugins/s3_auth/s3_auth.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1053,7 +1053,9 @@ int
config_reloader(TSCont cont, TSEvent event, void *edata)
{
Dbg(dbg_ctl, "reloading configs");
S3Config *s3 = static_cast<S3Config *>(TSContDataGet(cont));
S3Config *s3 = static_cast<S3Config *>(TSContDataGet(cont));
s3->check_current_action(edata);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you move this call to be first?

Copy link
Copy Markdown
Contributor Author

@masaori335 masaori335 Oct 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the main change. Prior to this change, the handling action is not cleared if the config is invalid ( returning without clearing the _conf_rld_action in line 1061 )
It makes S3Config holing the invalid pointer and try to cancel it on destructor.


S3Config *file_config = gConfCache.get(s3->conf_fname());

if (!file_config || !file_config->valid()) {
Expand All @@ -1064,7 +1066,6 @@ 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) {
Expand Down