Skip to content

Commit

Permalink
fix: Prevent over span (#3258)
Browse files Browse the repository at this point in the history
## 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.
  • Loading branch information
fredcarle authored Nov 20, 2024
1 parent fa0d92b commit 3fa579e
Show file tree
Hide file tree
Showing 72 changed files with 514 additions and 1,703 deletions.
228 changes: 0 additions & 228 deletions internal/core/data.go

This file was deleted.

Loading

0 comments on commit 3fa579e

Please sign in to comment.