TS-4396: fix number_of_redirections off-by-one#2092
TS-4396: fix number_of_redirections off-by-one#2092oknet merged 1 commit intoapache:masterfrom scw00:redierct_301_cache
Conversation
|
golang script |
|
By the way, the enable_redirection could be removed and use "redirection_tries < t_state.txn_conf->number_of_redirections" instead. |
|
[approve ci] |
|
That looks better. |
mingzym
left a comment
There was a problem hiding this comment.
looks good to me
[approve ci]
|
[approve ci] |
|
hmm, crash on transform test, should do nothing with this pr, but how can we debug that crash on the build if we got a core on the building test. |
|
[approve ci linux] |
|
Yes, it is candidate for 7.1.0 . |
|
@oknet can you review / approve this as well please? |
|
@oknet please review! |
|
[approve ci] |
|
@zwoop Can you comment the below changes in dfc2a8f: I think these changes should be revert as @scw00 does in this PR. |
|
@oknet I have no recollections / memory of this :-). Does this PR revert the changes as needed, or do we need a separate PR to revert? I have no objections to either. |
|
If we need to revert something, which is not covered here, please make a PR of course. |
|
The commit dfc2a8f for https://issues.apache.org/jira/browse/TS-2691 change the range of redirection_tries from [1, max) to [0, max). The I think we should not change the conditions in TS-2691. Just replace the |
|
@zwoop The below changes in dfc2a8f, Does it means if redirect enabled and this is the first follow on redirect ... ? With the changes, It means every follow on redirect ... |
|
Hmm. I think, we need to produce post data in every request. We setup a STATIC PRODUCER during redirecting, and free post buffer. |
|
@scw00 Yes, we should collect the post payload into postbuf for every CLIENT_VC as a producer. |
|
We want this on 7.1.0 still, right ? |
|
yes, it is!! |
|
Cherry-picked to 7.1.0 |
The enable_redirection will be turned off in the HttpSM::state_read_server_response_header
The redirect data is never cached if number_of_redirections is one.
#786
@mingzym Please review