fix: close session in case of error to avoid blocked session#11089
Merged
shreemaan-abhishek merged 5 commits intoApr 22, 2024
Merged
Conversation
…session on locking session storage (example unauth_action=deny)
markusmueller
marked this pull request as ready for review
March 25, 2024 16:03
Contributor
|
the solution looks good in first observation, let's wait for the CI to run then I will review this again. |
Contributor
Author
|
@shreemaan-abhishek Is it possible that ci is flaky? The errors don't seem related to this PR to me. |
Contributor
|
@starsz does this feature look good to you? |
starsz
reviewed
Apr 9, 2024
| } | ||
| }) | ||
| end | ||
| ngx.thread.spawn(firstRequest) |
Contributor
There was a problem hiding this comment.
How can you ensure that the first request is arrived before the second one?
I think maybe you can give a return value of the firstRequest function , and use ngx.thread.wait to get the return value.
Contributor
Author
There was a problem hiding this comment.
@starsz Thank you for the suggestion, I have implemented a wait for the completion of the first request.
starsz
approved these changes
Apr 22, 2024
shreemaan-abhishek
approved these changes
Apr 22, 2024
shreemaan-abhishek
pushed a commit
to shreemaan-abhishek/apisix
that referenced
this pull request
Jan 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…session on locking session storage (example unauth_action=deny)
Description
This PR is fixing a bug where sessions are blocked until ttl is expired in case of an authentication error. For example unauthenticated session and
unauth_action='deny'and locking session storage is configured.Basically the same problem as in #10788 but in case of error.
Fixes # (issue)
Checklist