Skip to content
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

feat: restore cache mutex #25

Merged
merged 5 commits into from
Jan 14, 2022
Merged

feat: restore cache mutex #25

merged 5 commits into from
Jan 14, 2022

Conversation

jeffwoooo
Copy link

@jeffwoooo jeffwoooo commented Jan 14, 2022

This restores concurrent cache mutex and fixes request freezing on ServeHTTP panic.

If ServeHTTP panics without this patch,

following codes which signal to channel won't be executed
so every requests who wait for channel will freeze

to signal regardless result of ServeHTTP,

capture request context's done event
close channel without sending value if serving was not successful

I was able to test with

force panic in any request like 'health'.
make several requests concurrently (curl ... & curl ... & curl ... & curl ... & wait)
freezing has gone!

@kjessec kjessec changed the base branch from main to staging January 14, 2022 04:54
@kjessec kjessec merged commit 8f38923 into staging Jan 14, 2022
@kjessec kjessec deleted the feat/restore-cache-mutex branch March 12, 2022 11:51
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.

3 participants