Skip to content

Avoid repeated remote schema fetches after failures#859

Open
iqdoctor wants to merge 2 commits intotamasfe:masterfrom
iqdoctor:fix/schema-fetch-negative-cache
Open

Avoid repeated remote schema fetches after failures#859
iqdoctor wants to merge 2 commits intotamasfe:masterfrom
iqdoctor:fix/schema-fetch-negative-cache

Conversation

@iqdoctor
Copy link
Copy Markdown

@iqdoctor iqdoctor commented Apr 7, 2026

Fixes #858.

Summary

  • avoid repeated negative-cache retries only for remote http(s) schema fetch failures
  • coalesce concurrent remote fetches for the same schema URL
  • preserve immediate retries for local file:// schema failures
  • publish the leader result to waiters and clean up in-flight ownership on cancellation
  • add regression tests for remote sequential failures, remote concurrent coalescing, local file retries, and cancellation recovery

Verification

  • cargo test -p taplo-common --features schema,reqwest,rustls-tls
  • cargo test -p taplo-lsp --features rustls-tls --no-run

@iqdoctor iqdoctor changed the title Avoid immediate schema refetches after recent failures Avoid repeated remote schema fetches after failures Apr 8, 2026
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.

Memory leak / repeated schema-fetch loop when a TOML schema endpoint returns 403 or non-JSON

1 participant