fix compaction split bug and add 3.1 test
Signed-off-by: Alex Chi <iskyzh@gmail.com>
This commit is contained in:
@@ -35,6 +35,10 @@ impl<T: AsRef<[u8]>> Key<T> {
|
||||
pub fn is_empty(&self) -> bool {
|
||||
self.0.as_ref().is_empty()
|
||||
}
|
||||
|
||||
pub fn for_testing_ts(self) -> u64 {
|
||||
self.1
|
||||
}
|
||||
}
|
||||
|
||||
impl Key<Vec<u8>> {
|
||||
@@ -149,6 +153,10 @@ impl<'a> Key<&'a [u8]> {
|
||||
pub fn for_testing_from_slice_no_ts(slice: &'a [u8]) -> Self {
|
||||
Self(slice, TS_DEFAULT)
|
||||
}
|
||||
|
||||
pub fn for_testing_from_slice_with_ts(slice: &'a [u8], ts: u64) -> Self {
|
||||
Self(slice, ts)
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: AsRef<[u8]> + Debug> Debug for Key<T> {
|
||||
|
||||
Reference in New Issue
Block a user