eldenmoon commented on PR #71144: URL: https://github.com/apache/doris/pull/71144#issuecomment-7428992250
**[P2] Avoid quadratic schema setup on wide WAL replay** `WalReader::_init_schema_from_block()` now calls `find_projected()` for every file column when the WAL contains a data block. Before this change the data-block path only iterated the file columns. With 2,000 columns and a full projection, the new lookup performs 2,001,000 identifier comparisons per WAL file, including WALs with no VARIANT columns. Schema initialization is cached within a reader, so the extra work is incurred per file during recovery. This is an operation count from the loop, with no recovery wall-time benchmark. Limit the data-block lookup to legacy VARIANT metadata that needs a preferred execution type, or index projections by field ID once before the loop if wide VARIANT projections also need linear setup. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
