./db/dbformat.h:134: rocksdb::Slice rocksdb::ExtractUserKey(const rocksdb::Slice&): Assertion `internal_key.size() >= 8' failed.
- Dominant language
- C++
- Stars
- 32.1k
- Forks
- 6.9k
- Avg merge
- 32m
- Merged PRs (30d)
- 1
Description
### Expected behavior
`iterator->SeekToFirst()` should work without firing an assert
### Actual behavior
The assert was seen in one of our unit tests when running on top of commit 9fc72d6f161add2940f12359123a01214dd24d73. This issue is not seen on v5.9.2. Backtrace for the assert without application code:
```
#0 0x00007f83bfac7495 in raise () from /lib64/libc.so.6
#1 0x00007f83bfac8c75 in abort () from /lib64/libc.so.6
#2 0x00007f83bfac060e in __assert_fail_base () from /lib64/libc.so.6
#3 0x00007f83bfac06d0 in __assert_fail () from /lib64/libc.so.6
#4 0x00000000005c451c in rocksdb::ExtractUserKey (internal_key=...) at ./db/dbformat.h:134
#5 rocksdb::InternalKeyComparator::Compare (this=, akey=..., bkey=...) at db/dbformat.cc:114
#6 0x00000000006dd611 in rocksdb::MinIteratorComparator::operator() (b=0xb3b1240, a=, this=0x21b40d8) at ./table/iter_heap.h:36
#7 rocksdb::BinaryHeap::upheap (index=184, this=0x21b40d8) at ./util/heap.h:111
#8 rocksdb::BinaryHeap::push(rocksdb::IteratorWrapper*&&) (value=@0x7ffd602a8658: 0xb3b1240, this=0x21b40d8) at ./util/heap.h:53
#9 rocksdb::MergingIterator::SeekToFirst (this=0x21b3ff0) at table/merging_iterator.cc:87
#10 0x00000000005beda9 in rocksdb::DBIter::SeekToFirst (this=0x21b3da0) at db/db_iter.cc:1265
```
All the inserted keys had size >= 8 bytes.
### Steps to reproduce the behavior
Repro code was shared with @sagar0
Contributor guide
Assessment
This issue has not been assessed yet.