You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
islamaliev
changed the title
After doc deletion the doc can still be fetch from another collection
After doc deletion the doc can still be fetched from another collection
Nov 15, 2024
## Relevant issue(s)
Resolves#3242
## Description
This PR solves the situation where deleted documents in the immediate
next collection by ID were returned on a full collection query. The
reason for this behaviour was due to the fetcher start method redefining
the spans based on wanting deleted docs or not and was defining an end
key that might have been "prefix-ended" based on a shorter prefix (i.e.
collection instead of instance type). ~~The solution was to always
redefine the end key as the prefix end of the start key.~~
To fix this we removed the concept of spans and replaced it with a list
of prefixes. This results in the fetcher being asked, for example, for
all docs in collection 1 with a prefix of `/data/1` instead of a span
from `/data/1` to `/data/2`. Furthermore, when the fetcher checks if it
need to get deleted docs or non-deleted docs, the resulting prefix
becomes `/data/1/< v or d >` instead of the span from `/data/1/< v or d
>` to `/data/2/< v or d >` (the span is wrong).
The first commit documents the bug with an integration test.
This test does not pass:
The last query returns 3 documents.
The text was updated successfully, but these errors were encountered: