Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasjungblut committed Jul 28, 2024
1 parent 1d4647f commit e421d30
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 3 additions & 0 deletions sstables/sstable_iterator.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ func (it *SSTableFullScanIterator) Next() ([]byte, []byte, error) {
}
}

// TODO(thomas): how do we know whether we need to skip here, based on the offset?
// TODO(thomas):

next, err := it.dataReader.ReadNext()
if err != nil {
return nil, nil, err
Expand Down
5 changes: 2 additions & 3 deletions sstables/sstable_writer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,10 @@ func TestFailedIndexAppend(t *testing.T) {
require.NoError(t, writer.WriteNext(intToByteSlice(44), intToByteSlice(45)))
require.NoError(t, writer.Close())

reader, _ := getFullScanIterator(t, writer.opts.basePath)
reader, it := getFullScanIterator(t, writer.opts.basePath)
defer closeReader(t, reader)

// TODO(thomas): this is failing, as the "optimized" iterator is not skipping partial records
// assertIteratorMatchesSlice(t, it, []int{42, 44})
assertIteratorMatchesSlice(t, it, []int{42, 44})
assertContentMatchesSlice(t, reader, []int{42, 44})
_, err = reader.Get(intToByteSlice(43))
require.Equal(t, NotFound, err)
Expand Down

0 comments on commit e421d30

Please sign in to comment.