Uh oh!
There was an error while loading. Please reload this page.
Fix Windows telemetry consent lock contention - #1107
Open
Gudge (MGudgin) wants to merge 1 commit into
Open
Conversation
This PR fixes intermittent telemetry consent-store lock acquisition failures on Windows. Details * Use a persistent lock file whose exclusive open handle represents ownership. * Allow pre-existing unlocked lock files to be reused without waiting for deletion. * Strengthen regression coverage with repeated concurrent consent writers. Tests * cargo fmt --all -- --check * cargo test -p wxc_common 'telemetry::consent::tests::windows_tests::' (50 passed) * cargo clippy -p wxc_common --all-targets -- -D warnings Fixes#1105 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b627f594-042c-4e5e-ad47-12dffa50bd92
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused change correctly preserves bounded serialization while eliminating stale-path contention.
Review tier: Balanced
Findings: None
What changed in this PR
Replaces delete-on-close telemetry locking with a persistent Windows lock file controlled by exclusive handle ownership.
Changes:
- Uses
share_mode(0)for exclusive lock acquisition. - Adds persistent/pre-existing lock-file tests.
- Strengthens concurrent consent-write stress coverage.
| File | Description |
|---|---|
src/core/wxc_common/src/telemetry/consent.rs | Updates Windows locking and regression tests. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
RamonArjona4
approved these changes
Sep 4, 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 freeto 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.
Fix intermittent Windows telemetry consent-store lock acquisition failures by using a persistent lock file whose exclusive open handle represents ownership. This avoids stale-looking lock paths when antivirus or indexer handles delay delete-on-close cleanup.
The externally visible consent behavior remains unchanged. Concurrent writers still serialize and use the existing bounded retry behavior.
Fixes#1105
Tests
cargo fmt --all -- --checkcargo test -p wxc_common 'telemetry::consent::tests::windows_tests::'— 50 passedcargo clippy -p wxc_common --all-targets -- -D warningsMicrosoft Reviewers: Open in CodeFlow