-
Notifications
You must be signed in to change notification settings - Fork 851
Adds two overridable config variables to control parent mark downs. #8595
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -214,6 +214,18 @@ markParentDown(HttpTransact::State *s) | |
| HTTP_INCREMENT_DYN_STAT(http_total_parent_marked_down_count); | ||
| url_mapping *mp = s->url_map.getMapping(); | ||
|
|
||
| TxnDebug("http_trans", "sm_id[%" PRId64 "] enable_parent_timeout_markdowns: %d, disable_parent_markdowns: %d", | ||
| s->state_machine->sm_id, s->txn_conf->enable_parent_timeout_markdowns, s->txn_conf->disable_parent_markdowns); | ||
|
|
||
| if (s->txn_conf->disable_parent_markdowns == 1) { | ||
| TxnDebug("http_trans", "parent markdowns are disabled for this request"); | ||
| return; | ||
| } | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If disable_parent_markdowns is 1, we return on line 222, so the value of enable_parent_timeout_markdowns is moot. That is what makes me think it would be clearer to combine the two settings into a single one.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, I’ll make the changes |
||
|
|
||
| if (s->current.state == HttpTransact::INACTIVE_TIMEOUT && s->txn_conf->enable_parent_timeout_markdowns == 0) { | ||
| return; | ||
| } | ||
|
|
||
| if (s->response_action.handled) { | ||
| // Do nothing. If a plugin handled the response, let it handle markdown. | ||
| } else if (mp && mp->strategy) { | ||
|
|
@@ -3702,7 +3714,7 @@ HttpTransact::handle_response_from_parent(State *s) | |
| // Only mark the parent down if we failed to connect | ||
| // to the parent otherwise slow origin servers cause | ||
| // us to mark the parent down | ||
| if (s->current.state == CONNECTION_ERROR) { | ||
| if (s->current.state == CONNECTION_ERROR || s->current.state == INACTIVE_TIMEOUT) { | ||
| markParentDown(s); | ||
| } | ||
| // We are done so look for another parent if any | ||
|
|
@@ -3713,7 +3725,7 @@ HttpTransact::handle_response_from_parent(State *s) | |
| // appropriate | ||
| HTTP_INCREMENT_DYN_STAT(http_total_parent_retries_exhausted_stat); | ||
| TxnDebug("http_trans", "[handle_response_from_parent] Error. No more retries."); | ||
| if (s->current.state == CONNECTION_ERROR) { | ||
| if (s->current.state == CONNECTION_ERROR || s->current.state == INACTIVE_TIMEOUT) { | ||
| markParentDown(s); | ||
| } | ||
| s->parent_result.result = PARENT_FAIL; | ||
|
|
||
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.
Why do you feel like we should mention these particular plugins as the ones overriding the configs? Any plugin that uses these TS API calls can override them:
trafficserver/include/ts/ts.h
Line 2459 in 4e6dc02