Skip to content

fix(http): harden FileCache concurrent access - #912

Open
Yundi339 wants to merge 2 commits into
ithewei:masterfrom
Yundi339:fix/filecache-concurrency
Open

Yundi339 wants to merge 2 commits into
ithewei:masterfrom
Yundi339:fix/filecache-concurrency

Conversation

@Yundi339

Copy link
Copy Markdown

Harden concurrent access to the HTTP FileCache without changing its public size configuration.

Changes:

  • serialize cold loads and refreshes for the same path;
  • build refreshed entries off-cache before publishing them;
  • protect mutable cache entry state with an entry mutex;
  • keep cache entries alive while HTTP response buffers are being sent;
  • skip entries currently in use during expiration cleanup;
  • add a concurrent same-path regression test.

This is intentionally split from the larger FileCache configurability work in PR #823.

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.

1 participant