Skip to content

fix(memory-storage): Avoid duplicate processed requests in memory request queue client#1941

Merged
vdusek merged 1 commit into
masterfrom
fix/memory-rq-duplicate-processed-requests
Jun 4, 2026
Merged

fix(memory-storage): Avoid duplicate processed requests in memory request queue client#1941
vdusek merged 1 commit into
masterfrom
fix/memory-rq-duplicate-processed-requests

Conversation

@vdusek
Copy link
Copy Markdown
Collaborator

@vdusek vdusek commented Jun 3, 2026

Description

  • MemoryRequestQueueClient.add_batch_of_requests appended a ProcessedRequest twice for requests that were already present in the queue but not yet handled — once in the was_already_present branch and again at the unconditional append after the if/else block, which that branch did not skip.
  • This violated the contract that AddRequestsResponse.processed_requests contains exactly one entry per input request and inflated results for any caller iterating the list.
  • Removed the inner append so the shared append at the end handles both branches, matching the structure of the file system client. Added a regression test.

The 'already present but not yet handled' branch in MemoryRequestQueueClient.add_batch_of_requests appended a ProcessedRequest and then fell through to the unconditional append, producing two identical entries for one input request. Remove the inner append so each input yields exactly one entry, matching the file system client.
@vdusek vdusek added t-tooling Issues with this label are in the ownership of the tooling team. adhoc Ad-hoc unplanned task added during the sprint. labels Jun 3, 2026
@vdusek vdusek self-assigned this Jun 3, 2026
@github-actions github-actions Bot added this to the 142nd sprint - Tooling team milestone Jun 3, 2026
@github-actions github-actions Bot added the tested Temporary label used only programatically for some analytics. label Jun 3, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.89%. Comparing base (dc1ed61) to head (1577ff2).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1941      +/-   ##
==========================================
+ Coverage   92.85%   92.89%   +0.04%     
==========================================
  Files         167      167              
  Lines       11714    11713       -1     
==========================================
+ Hits        10877    10881       +4     
+ Misses        837      832       -5     
Flag Coverage Δ
unit 92.89% <ø> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vdusek vdusek requested a review from janbuchar June 3, 2026 18:02
@vdusek vdusek changed the title fix: Avoid duplicate processed requests in memory request queue client fix(memory-storage): Avoid duplicate processed requests in memory request queue client Jun 3, 2026
@vdusek vdusek marked this pull request as ready for review June 3, 2026 18:02
Copy link
Copy Markdown
Collaborator

@Mantisus Mantisus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vdusek vdusek merged commit d343d0e into master Jun 4, 2026
33 checks passed
@vdusek vdusek deleted the fix/memory-rq-duplicate-processed-requests branch June 4, 2026 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants