Skip to content

fix: unnecessary YAML Config reloads#9065

Merged
juststillthinking merged 3 commits into
apache:masterfrom
boekkooi-lengoo:avoid-unnecessary-reloads
Jan 12, 2024
Merged

fix: unnecessary YAML Config reloads#9065
juststillthinking merged 3 commits into
apache:masterfrom
boekkooi-lengoo:avoid-unnecessary-reloads

Conversation

@boekkooi-lengoo

Copy link
Copy Markdown
Contributor

Description

In order to avoid unnecessary reloading of the yaml configuration. The time used to detect the last change to the config file is changed from change which is the time of the last file status change to the modification time wich is the time of the last data modification.

For more information also checkout http://lunarmodules.github.io/luafilesystem/manual.html#reference and https://linux.die.net/man/2/stat

Fixes: #9051

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@boekkooi-lengoo boekkooi-lengoo changed the title Use mtime instead of ctime YAML Config - Use mtime instead of ctime Mar 14, 2023
@boekkooi-lengoo boekkooi-lengoo changed the title YAML Config - Use mtime instead of ctime fix: unnecessary YAML Config reloads Mar 14, 2023
@juststillthinking

Copy link
Copy Markdown
Contributor

@boekkooi-lengoo

Copy link
Copy Markdown
Contributor Author

Hey @monkeyDluffy6017,
What type of test case should I add?
I'm not sure how to best reproduce the issue in a test using lua.

On a related not after reading https://apenwarr.ca/log/20181113 I'm thinking that we should add inode and size to the version as well. What do you think?

@juststillthinking

Copy link
Copy Markdown
Contributor

@shreemaan-abhishek

Copy link
Copy Markdown
Contributor

ping @boekkooi-lengoo

@boekkooi-lengoo
boekkooi-lengoo force-pushed the avoid-unnecessary-reloads branch from f8e1377 to a04cf84 Compare January 10, 2024 14:19
Show how a reload is triggered when it's not needed.
In order to avoid unnecessary reloading of the yaml configuration. The time used to detect the last change to the config file is changed from `change` which is the time of the last file status change to the `modification` time wich is the time of the last data modification.

For more information also checkou http://lunarmodules.github.io/luafilesystem/manual.html#reference and https://linux.die.net/man/2/stat

Fixes: apache#9051
@boekkooi-lengoo
boekkooi-lengoo force-pushed the avoid-unnecessary-reloads branch from a04cf84 to c3c014b Compare January 10, 2024 14:23
@boekkooi-lengoo

Copy link
Copy Markdown
Contributor Author

@shreemaan-abhishek 🏓

@juststillthinking

Copy link
Copy Markdown
Contributor

please merge the master

@boekkooi-lengoo

Copy link
Copy Markdown
Contributor Author

@monkeyDluffy6017 Created merge commit 684c78d as requested

@juststillthinking
juststillthinking merged commit bfb9a98 into apache:master Jan 12, 2024
@boekkooi-lengoo
boekkooi-lengoo deleted the avoid-unnecessary-reloads branch January 12, 2024 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

help request: Lots of load(): new plugins logs

4 participants