foyer-rs / foyer

Hybrid in-memory and disk cache in Rust
https://foyer.rs
Apache License 2.0
291 stars 20 forks source link

bug: 'tokio-runtime-worker' panicked at foyer-storage/src/io_buffer_pool.rs #723

Closed kemingy closed 1 month ago

kemingy commented 1 month ago

Error messages:

thread 'tokio-runtime-worker' panicked at /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/foyer-storage-0.10.2/src/io_buffer_pool.rs:58:9:
assertion `left == right` failed
  left: 2797568
 right: 2796202

Config:

HybridCacheBuilder::new()
      .memory(4096)
      .storage()
      .with_device_config(
          DirectFsDeviceOptionsBuilder::new(cache_path.clone())
              .with_capacity(4096 * 1024 * 1024)
              .build(),
      )
      .with_admission_picker(Arc::new(RateLimitPicker::new(
          4096 * 1024 * 1024,
      )))
      .with_flushers(6)
      .with_flush(true)
      .with_reclaimers(6)
      .with_clean_region_threshold(8)
      .build()
      .await
      .expect("failed to create cache"),