Also count the direct_inserts

This commit is contained in:
Clément Renault 2024-07-20 17:15:33 +02:00
parent f355cf6985
commit 7adc715783
No known key found for this signature in database
GPG Key ID: F250A4C4E3AE5F5F

View File

@ -210,6 +210,10 @@ where
}
pub fn direct_insert(&mut self, key: &[u8], val: &[u8]) -> Result<(), grenad::Error<U>> {
self.cbo_buffer.clear();
self.cbo_buffer.extend_from_slice(self.prefix);
self.cbo_buffer.extend_from_slice(key);
self.conn.merge(&self.cbo_buffer, 1u32.to_ne_bytes()).unwrap();
self.sorter.insert(key, val)
}