Skip to content

Commit 8ccdae6

Browse files
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

File tree

posting/mvcc.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -496,8 +496,7 @@ func (ml *MemoryLayer) IterateDisk(ctx context.Context, f IterateDiskArgs) error
496496
if err != nil {
497497
return err
498498
}
499-
empty, err := false, nil
500-
//empty, err := l.IsEmpty(f.ReadTs, 0)
499+
empty, err := l.IsEmpty(f.ReadTs, 0)
501500
switch {
502501
case err != nil:
503502
return err

0 commit comments

Comments
 (0)