-
Notifications
You must be signed in to change notification settings - Fork 668
Increased timeout in Secondary Index Checkpoint Tracker tests #5094
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
Conversation
In the CI where thread number is limited 500ms may be too short for high threading tests, increaded the max waiting time in SecondaryIndexCheckpointTrackerTests. Moved also reseting tracker loop waiter to happen before resetting the increment counter to 0.
Qodana for .NETIt seems all right 👌 No new problems were found according to the checks applied 💡 Qodana analysis was run in the pull request mode: only the changed files were checked Contact Qodana teamContact us at qodana-support@jetbrains.com
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR aims to fix a race condition in the Secondary Index Checkpoint Tracker by adjusting the order of operations in the tracker loop and increasing the timeout in tests to accommodate high-threading scenarios.
- Moved the _signal.Reset() call to occur before the counter exchange to prevent race conditions.
- Increased timeout values in tests from 500ms to 5 seconds to ensure stability under high threading conditions.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
src/KurrentDB.SecondaryIndexing/Subscriptions/SecondaryIndexCheckpointTracker.cs | Adjusts signal reset ordering to mitigate race conditions. |
src/KurrentDB.SecondaryIndexing.Tests/Subscriptions/SecondaryIndexCheckpointTrackerTests.cs | Increases timeout durations in tests to prevent premature failure. |
} | ||
|
||
private static readonly TimeSpan HalfOfASecond = TimeSpan.FromMilliseconds(500); | ||
private static readonly TimeSpan FiveSeconds = TimeSpan.FromSeconds(5); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: It's better not to reflect the value as well as the type of the variable in its name. Just choose CommitSignalTimeout
or similar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the CI where the thread number is limited, 500ms may be too short for high threading tests, increased the max waiting time in
SecondaryIndexCheckpointTrackerTests
.