Current open-scan count. For tests / metrics.
(&self, tenant_id: u64, collection: &str)
| 85 | |
| 86 | /// Current open-scan count. For tests / metrics. |
| 87 | pub fn open_scans(&self, tenant_id: u64, collection: &str) -> usize { |
| 88 | let inner = self.inner.lock().expect("CollectionQuiesce mutex poisoned"); |
| 89 | inner |
| 90 | .states |
| 91 | .get(&(tenant_id, collection.to_string())) |
| 92 | .map_or(0, |s| s.open_scans) |
| 93 | } |
| 94 | |
| 95 | /// Whether a drain is currently in progress for this collection. |
| 96 | pub fn is_draining(&self, tenant_id: u64, collection: &str) -> bool { |