Update engine.rs to fix #206 (#222)
Some checks failed
Build / build (push) Has been cancelled

This commit is contained in:
SF-Zhou 2025-03-30 14:14:03 +08:00 committed by GitHub
parent 12aeb12ac2
commit dfadd59868
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -661,7 +661,7 @@ impl Engine {
const BATCH_SIZE: Size = Size::mebibyte(1);
let mut write_batch = RocksDB::new_write_batch();
for (chunk_id, meta) in &mut chunks {
if write_batch.size_in_bytes() >= BATCH_SIZE.0 as _ {
if write_batch.size_in_bytes() >= BATCH_SIZE.0 as usize {
self.meta_store.write(write_batch, true)?;
write_batch = RocksDB::new_write_batch();
}