Skip to content

test: guard synchronous DPC cache writes - #1106

Open
houyuwushang wants to merge 1 commit into
trickstercache:mainfrom
houyuwushang:test-dpc-sync-cache-write-765
Open

test: guard synchronous DPC cache writes#1106
houyuwushang wants to merge 1 commit into
trickstercache:mainfrom
houyuwushang:test-dpc-sync-cache-write-765

Conversation

@houyuwushang

Copy link
Copy Markdown
Contributor

Description

#930 made DPC cache writes synchronous inside the singleflight executor, removing the background access reported in #765. The chunked range-miss test still slept for 10 ms to wait for that old goroutine.

Remove the delay and issue the next request immediately. The existing kmiss to rmiss assertions now guard that the first handler does not return before its cache write completes. As a mutation check, moving WriteCache back into a goroutine made the test fail with status=kmiss.

Closes #765.

Tests:

  • go test ./pkg/proxy/engines -count=1
  • go test -race ./pkg/proxy/engines -count=1
  • go test -race ./pkg/proxy/engines -run '^TestDeltaProxyCacheRequestRangeMissChunks$' -count=1000
  • go tool golangci-lint run -c .golangci.yml ./pkg/proxy/engines/...

Type of Change

    • Bug fix
    • New feature
    • Optimization
    • Test coverage
    • Documentation
    • Infrastructure

AI Disclosure

    • This contribution DOES NOT include AI-generated changes
    • This contribution DOES include AI-generated changes, and I have reviewed the relevant contributing guidelines.

Signed-off-by: houyuwushang <liuluoqianqiu@outlook.com>
@houyuwushang
houyuwushang requested a review from a team as a code owner August 14, 2026 09:37
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.

Data Race observed in pkg/proxy/engines

1 participant