Render the scoped stale-conflict cleanup result. Shared by the ordinary record outcome path and the metadata-only narrow route so both report the same actual operation identity and cleared scope.
(
view: &str,
paths: &[String],
rows_cleared: usize,
operation: Option<atomic_core::OperationId>,
)
| 230 | /// Shared by the ordinary record outcome path and the metadata-only narrow |
| 231 | /// route so both report the same actual operation identity and cleared scope. |
| 232 | pub(super) fn format_conflict_cleanup( |
| 233 | view: &str, |
| 234 | paths: &[String], |
| 235 | rows_cleared: usize, |
| 236 | operation: Option<atomic_core::OperationId>, |
| 237 | ) -> String { |
| 238 | let operation = operation |
| 239 | .map(|id| id.to_string()) |
| 240 | .unwrap_or_else(|| "none".to_string()); |
| 241 | let mut output = format!( |
| 242 | "Cleared stale conflict metadata on view '{}': {} row(s) across {} path(s)\n", |
| 243 | view, |
| 244 | rows_cleared, |
| 245 | paths.len() |
| 246 | ); |
| 247 | for path in paths { |
| 248 | output.push_str(&format!(" cleared: {}\n", path)); |
| 249 | } |
| 250 | output.push_str(&format!(" operation: {}\n", operation)); |
| 251 | output |
| 252 | } |