Skip to content

[8.2] MOD-14618 Fix race condition when calling indexLabelCount on SVS without locks#930

Open
github-actions[bot] wants to merge 1 commit into8.2from
backport-919-to-8.2
Open

[8.2] MOD-14618 Fix race condition when calling indexLabelCount on SVS without locks#930
github-actions[bot] wants to merge 1 commit into8.2from
backport-919-to-8.2

Conversation

@github-actions
Copy link
Copy Markdown

@github-actions github-actions bot commented Apr 13, 2026

Description

Backport of #919 to 8.2.


Note

Medium Risk
Touches tiered-index concurrency by adding locking around sub-index debug-info access; low functional impact but mistakes could cause contention or deadlocks under background indexing.

Overview
Prevents races when collecting tiered index debug output by acquiring shared_locks on flatIndexGuard and mainIndexGuard before calling frontendIndex->debugInfoIterator() and backendIndex->debugInfoIterator().

Locks are scoped per sub-index (instead of held across both calls) to keep the critical sections small while still making debug-info generation safe during background indexing.

Reviewed by Cursor Bugbot for commit 6e89436. Bugbot is set up for automated code reviews on this repo. Configure here.

…thout locks (#919)

* proposal to fix flaky test

* clarify scope

* fiox preferAdHocSearch and add comment to indexLabelCount()

* revert preferAdHocSearch

---------

Co-authored-by: meiravgri <meirav.grimberg@redis.com>
(cherry picked from commit 42fdc90)
@GuyAv46 GuyAv46 marked this pull request as draft April 13, 2026 13:33
@GuyAv46 GuyAv46 marked this pull request as ready for review April 13, 2026 13:33
@GuyAv46 GuyAv46 requested a review from JoanFM April 13, 2026 13:33
@jit-ci
Copy link
Copy Markdown

jit-ci bot commented Apr 13, 2026

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.01%. Comparing base (09adad1) to head (6e89436).

Additional details and impacted files
@@           Coverage Diff           @@
##              8.2     #930   +/-   ##
=======================================
  Coverage   97.01%   97.01%           
=======================================
  Files         126      126           
  Lines        7364     7366    +2     
=======================================
+ Hits         7144     7146    +2     
  Misses        220      220           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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