fix: revert "Convert panic --> `warn` on statistics mismatch (#2125)" (#2250)

This reverts commit 7415fa0d05.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
pull/24376/head
Andrew Lamb 2021-08-13 07:39:12 -04:00 committed by GitHub
parent cba03e9c47
commit db5fd935dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 7 deletions

View File

@ -1,7 +1,6 @@
//! This module contains structs that describe the metadata for a partition
//! including schema, summary statistics, and file locations in storage.
use observability_deps::tracing::warn;
use serde::{Deserialize, Serialize};
use std::{
borrow::{Borrow, Cow},
@ -107,12 +106,15 @@ impl TableSummary {
// Validate that the counts are consistent across columns
for c in &self.columns {
// Restore to assert when https://github.com/influxdata/influxdb_iox/issues/2124 is fixed
if c.total_count() != count {
warn!(table_name=%self.name, column_name=%c.name,
column_count=c.total_count(), previous_count=count,
"Mismatch in statistics count, see #2124");
}
assert_eq!(
c.total_count(),
count,
"Mismatch counts in table {} column {}, expected {} got {}",
self.name,
c.name,
count,
c.total_count()
)
}
count
}