-
Notifications
You must be signed in to change notification settings - Fork 848
regex_revalidate c++, lifecycle messages, MISS support #6455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
018f4c8 to
f22c6a5
Compare
|
|
4c72385 to
e9f3372
Compare
e9f3372 to
4371585
Compare
|
I think I will need to add a backwards compatibility mode so that mixed environments can be consistent...not necessary.... |
|
Changed requirements based on a compelling end user/limited self service use case from #7322 |
7668e65 to
f9cd7fc
Compare
|
[approve ci] |
|
@ywkaras is going to take a look at this. |
| TSContDataSet(config_cont, static_cast<void *>(pstate)); | ||
|
|
||
| // constantly run this for rule grooming | ||
| TSContScheduleOnPool(config_cont, CONFIG_TMOUT, TS_THREAD_POOL_TASK); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems convoluted to schedule this, then ignore the event it generates, when timed_reload is false.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
convoluted is correct. Even with timed_reload disabled any expired rules will still be pruned out so this needs to still be run.
392f90d to
1ed1f3a
Compare
9892352 to
b7a7b20
Compare
| @@ -1,524 +0,0 @@ | |||
| /** @file | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you do git mv regex_revalidate.c regex_revalidate.cc before you started editing? This might have been a faster review if it was easier to see what was changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps. the changes are fairly destructive regardless.
|
|
||
| setup_config_cont(pstate); | ||
|
|
||
| TSCont const main_cont = TSContCreate(main_handler, nullptr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't the two continuations need the same mutex since they both access pstate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i believe that wouldn't allow the invalidation and the config continuations to run asynchronously. That's what the atomic locks for pstate does. I'm guessing this might break if global plugin reloading is enabled?
… via trailing MISS keyword
… via trailing MISS keyword (cherry picked from commit 232a98c) (apache#6455)
… via trailing MISS keyword (cherry picked from commit 232a98c) (apache#6455)
A direct port of regex_revalidate to c++ with added targeted messages:
The
config_reloadoption allows only regex_revalidate to be reloaded outside of atraffic_ctl config reloadThe
config_printoption will dump current active rules and times totraffic.out(or stderr)This version uses a std::vector<> of rules which benchmarks faster than the c linked list implementation.
Also an attempt was made to clean up rule loading and pruning.
Based on #7322, the following mode will be available (now WIP):
Resolves #7322
Also added the ability to optionally add the keyword "MISS" at the end of a configure line to force an asset refetch instead of just an IMS check.