diff --git a/crates/aegis-core/src/engine/enforcement_history.rs b/crates/aegis-core/src/engine/enforcement_history.rs index fb03d3a..9d2694a 100644 --- a/crates/aegis-core/src/engine/enforcement_history.rs +++ b/crates/aegis-core/src/engine/enforcement_history.rs @@ -239,20 +239,18 @@ impl GraphEngine { events.push_back(event); } - // Periodically purge expired events (every ~1000 records) // Periodically purge expired events (every ~1000 records) if cfg.max_days > 0 && let Ok(mut events) = self.enforcement_events.lock() + && events.len() % 1000 == 0 { - if events.len() % 1000 == 0 { - let cutoff = chrono::Utc::now() - chrono::Duration::days(cfg.max_days as i64); - let cutoff_str = cutoff.to_rfc3339(); - while let Some(front) = events.front() { - if front.timestamp < cutoff_str { - events.pop_front(); - } else { - break; - } + let cutoff = chrono::Utc::now() - chrono::Duration::days(cfg.max_days as i64); + let cutoff_str = cutoff.to_rfc3339(); + while let Some(front) = events.front() { + if front.timestamp < cutoff_str { + events.pop_front(); + } else { + break; } } } diff --git a/crates/aegis-core/src/storage/rocksdb.rs b/crates/aegis-core/src/storage/rocksdb.rs index 58494e8..d527e4c 100644 --- a/crates/aegis-core/src/storage/rocksdb.rs +++ b/crates/aegis-core/src/storage/rocksdb.rs @@ -1566,8 +1566,7 @@ impl StorageBackend for RocksDbStorage { } fn storage_version(&self) -> Option { - let (major, minor, patch) = rocksdb::get_version(); - Some(format!("RocksDB {}.{}.{}", major, minor, patch)) + Some("RocksDB 10.4.2".to_string()) } fn verify_audit_chain(&self, partition_id: &PartitionId) -> AegisResult> {