Skip to content

fix: Fix handling of duplicate delete requests - #18460

Merged
sandeepsukhani merged 4 commits into
mainfrom
fix-handling-duplicate-delete-requests
Jul 16, 2025
Merged

fix: Fix handling of duplicate delete requests#18460
sandeepsukhani merged 4 commits into
mainfrom
fix-handling-duplicate-delete-requests

Conversation

@sandeepsukhani

@sandeepsukhani sandeepsukhani commented Jul 15, 2025

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:
Due to a bug in the code, we would not skip requests detected as duplicates and still process them. This would also lead to marking the shards of duplicate delete requests as processed multiple times.

Marking the same delete request shards as processed in SQLite would lead to an incorrect processed shard count and leave the consolidated delete request record in an unprocessed state forever, even though all its shards would be processed. The reason is that we mark the consolidated delete request record as completed when the processed shard count is equal to the total shard count.

I want to point out that this bug does not impact the functioning of the compactor or the processing of delete requests. The compactor will continue to process the remaining shards of the request. It is just that the tenant would feel that their delete requests are stuck in processing.

In this PR, I am fixing the bug, which includes the following changes:

  1. Do not add the duplicate delete request to the list of requests for processing.
  2. Add a check in SQLite for the number of records to be updated when an update query is executed.
  3. Add a function to SQLite store code for fixing the shard count. Call this fix function once after initialising the SQLite store.

Special notes for your reviewer:
This bug does not impact the functioning of the compactor or the processing of delete requests. The compactor will continue to process the remaining shards of the request.

Checklist

  • Tests updated
@sandeepsukhani
sandeepsukhani requested a review from a team as a code owner July 15, 2025 11:32
@sandeepsukhani
sandeepsukhani merged commit 255fce2 into main Jul 16, 2025
66 checks passed
@sandeepsukhani
sandeepsukhani deleted the fix-handling-duplicate-delete-requests branch July 16, 2025 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2 participants