Commit 8ccdae6
fix(posting): re-enable IsEmpty check in IterateDisk
The original branch commit 41d6445 ("fixed some bug") replaced
the IsEmpty(readTs) call in IterateDisk with a hardcoded `false`,
forcing every key found by the iterator to be reported as non-empty.
That broke has(<predicate>) for any uid whose value had been removed
via star-deletion (<uid> <pred> *): the data list still exists in
badger with a DeleteAll marker on top, but the live posting list is
empty at readTs — IsEmpty returns true and the uid should be skipped.
Surfaced by systest TestSystestSuite/TestHasDeletedEdge in
systest/mutations-and-queries: 3 nodes are created with <end> "",
one is star-deleted, follow-up has(end) is expected to return 2 uids.
With IsEmpty stubbed to false it returned 3.
No comment was left on the original change. Restoring the call. The
mutations-and-queries package is fully green with this in place
(66/66 tests pass including TestHasDeletedEdge); if a real underlying
issue motivated the original disable we'll chase it with a real
diagnosis instead of silently dropping a safety check.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>1 parent 86ad1ee commit 8ccdae6
1 file changed
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
496 | 496 | | |
497 | 497 | | |
498 | 498 | | |
499 | | - | |
500 | | - | |
| 499 | + | |
501 | 500 | | |
502 | 501 | | |
503 | 502 | | |
| |||
0 commit comments