Search before asking
Version
4.1.0
What's Wrong?
BE fails to initialize storage reader and continuously reports errors when __internal_schema.column_statistics contains illegal date strings like '0000-00-00 00:00:00'.
When a business table has invalid date strings (e.g. imported from legacy MySQL or skipping strict checks), the auto-analyze task collects '0000-00-00 00:00:00' as min/max values and writes them into __internal_schema.column_statistics.
When any query (or CBO optimizer) attempts to read statistics from __internal_schema.column_statistics, the BE Storage Reader fails to parse the string during initialization and cancels the entire query execution context with error:
[E-3110][INVALID_ARGUMENT] parse date or datetime fail, string: '0000-00-00 00:00:00' failed to initialize storage reader.
This creates a dead-lock where __internal_schema.column_statistics becomes completely unreadable (SELECT count(1) FROM __internal_schema.column_statistics fails), and CBO statistics loading for dependent queries gets broken.
What You Expected?
- Sanitization on Write: Statistics collection (ANALYZE) should sanitize or convert invalid date/datetime strings (like '0000-00-00 00:00:00') to NULL or skip them before persisting into
__internal_schema.column_statistics.
- Graceful Degrade on Read: BE Storage Reader should handle or ignore unparsable date values during statistics deserialization gracefully, rather than throwing a fatal error [E-3110] and canceling the entire query.
How to Reproduce?
No response
Anything Else?
-
Temporary Workarounds & Mitigations:
- Disabled global auto analyze to stop recurring failure:
SET GLOBAL enable_auto_analyze = false;
- Dropped and truncated the corrupted internal statistics table to recover read ability:
DROP STATS __internal_schema.column_statistics;
TRUNCATE TABLE __internal_schema.column_statistics;
-
Impact:
Because of this bug, we are forced to keep enable_auto_analyze = false, which prevents the cluster from automatically gathering CBO statistics for all other normal tables.
-
Stack Trace snippet from BE:
0# doris::BetaRowsetReader::_init_iterator()
1# doris::BetaRowsetReader::_init_iterator_once()
2# doris::Status doris::BetaRowsetReader::_next_batchdoris::Block(doris::Block*)
3# doris::BetaRowsetReader::next_batch(doris::Block*)
4# doris::VCollectIterator::Level0Iterator::refresh_current_row()
5# doris::VCollectIterator::Level0Iterator::ensure_first_row_ref()
6# doris::VCollectIterator::Level1Iterator::ensure_first_row_ref()
7# doris::VCollectIterator::build_heap()
8# doris::BlockReader::_init_collect_iter()
9# doris::BlockReader::init()
10# doris::OlapScanner::_open_impl()
Are you willing to submit PR?
Code of Conduct
Search before asking
Version
4.1.0
What's Wrong?
BE fails to initialize storage reader and continuously reports errors when
__internal_schema.column_statisticscontains illegal date strings like'0000-00-00 00:00:00'.When a business table has invalid date strings (e.g. imported from legacy MySQL or skipping strict checks), the auto-analyze task collects
'0000-00-00 00:00:00'asmin/maxvalues and writes them into__internal_schema.column_statistics.When any query (or CBO optimizer) attempts to read statistics from
__internal_schema.column_statistics, the BE Storage Reader fails to parse the string during initialization and cancels the entire query execution context with error:[E-3110][INVALID_ARGUMENT] parse date or datetime fail, string: '0000-00-00 00:00:00' failed to initialize storage reader.This creates a dead-lock where
__internal_schema.column_statisticsbecomes completely unreadable (SELECT count(1) FROM __internal_schema.column_statisticsfails), and CBO statistics loading for dependent queries gets broken.What You Expected?
__internal_schema.column_statistics.How to Reproduce?
No response
Anything Else?
Temporary Workarounds & Mitigations:
SET GLOBAL enable_auto_analyze = false;DROP STATS __internal_schema.column_statistics;TRUNCATE TABLE __internal_schema.column_statistics;Impact:
Because of this bug, we are forced to keep
enable_auto_analyze = false, which prevents the cluster from automatically gathering CBO statistics for all other normal tables.Stack Trace snippet from BE:
0# doris::BetaRowsetReader::_init_iterator()
1# doris::BetaRowsetReader::_init_iterator_once()
2# doris::Status doris::BetaRowsetReader::_next_batchdoris::Block(doris::Block*)
3# doris::BetaRowsetReader::next_batch(doris::Block*)
4# doris::VCollectIterator::Level0Iterator::refresh_current_row()
5# doris::VCollectIterator::Level0Iterator::ensure_first_row_ref()
6# doris::VCollectIterator::Level1Iterator::ensure_first_row_ref()
7# doris::VCollectIterator::build_heap()
8# doris::BlockReader::_init_collect_iter()
9# doris::BlockReader::init()
10# doris::OlapScanner::_open_impl()
Are you willing to submit PR?
Code of Conduct