Repository navigation
Conversation
Track nested suppression scopes with a thread-local depth and make `recordToSystemErrors` record only after the outermost scope unwinds. Apply narrow scopes to handled parsing, probing, retry, and fallback paths while keeping terminal and unexpected failures visible. Document audited and deferred cases in `ERRORS_LEAKED.md` and add focused unit and stateless regression coverage. Related: #111141
Make `recordToSystemErrors` defer to outer retry and fallback scopes by default while allowing consumed unexpected errors to force recording. Fix async, HTTP, Data Lake, and row-format ownership boundaries and strengthen exact-count tests.
|
Workflow [PR], commit [bf9a700] Summary: ❌
AI ReviewSummaryThis PR adds a broad Findings
Final VerdictChanges requested. |
There was a problem hiding this comment.
Pull request overview
This PR refines ClickHouse’s exception/error accounting so that speculative/handled failures (parser probes, retries, fallbacks, TOCTOU reads, etc.) do not inflate system.errors / system.error_log, while still ensuring truly terminal failures are recorded explicitly.
Changes:
- Introduces/extends
Exception::SuppressErrorCodesScopeas a nested, thread-local suppression mechanism and updatesrecordToSystemErrorsto respect nested suppression (with aforceescape hatch). - Applies suppression + explicit recording across many call sites (parsers, formats, storage engines, background metrics, networking/HTTP, ZooKeeper/Keeper paths, etc.).
- Adds regression tests (stateless query test + unit tests) to validate suppression/recording behavior.
Reviewed changes
Copilot reviewed 164 out of 164 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/queries/0_stateless/04628_handled_fallbacks_no_system_errors.sh | New stateless test ensuring handled fallbacks don’t populate system error tables |
| tests/queries/0_stateless/04628_handled_fallbacks_no_system_errors.reference | Expected output for the new stateless test |
| src/TableFunctions/TableFunctionViewIfPermitted.cpp | Suppress speculative failures; explicitly record unexpected terminal ones |
| src/Storages/System/StorageSystemZooKeeperInfo.cpp | Suppress expected probe/IO failures in system table collection |
| src/Storages/System/StorageSystemTables.cpp | Suppress non-fatal metadata size/row-count failures in system.tables |
| src/Storages/System/StorageSystemStackTrace.cpp | Suppress TOCTOU /proc reads; record unexpected terminal errors |
| src/Storages/System/StorageSystemReplicas.cpp | Explicitly record non-ignored replica status failures |
| src/Storages/System/StorageSystemRemoteDataPaths.cpp | Suppress transient filesystem races; record unexpected failures |
| src/Storages/System/StorageSystemKeeperSnapshots.cpp | Suppress expected disk-existence probes |
| src/Storages/System/StorageSystemKeeperChangelogs.cpp | Suppress expected disk-existence probes |
| src/Storages/System/StorageSystemFunctions.cpp | Suppress lookup/probe failures; record unexpected exceptions |
| src/Storages/System/StorageSystemDictionaries.cpp | Suppress speculative dictionary-structure parsing |
| src/Storages/System/StorageSystemDetachedParts.cpp | Suppress non-critical failures in size computation path |
| src/Storages/System/StorageSystemDDLWorkerQueue.cpp | Suppress speculative parse; record unexpected parse failures |
| src/Storages/System/StorageSystemDatabaseReplicas.cpp | Explicitly record non-ignored status failures |
| src/Storages/System/StatusRequestsPool.h | Suppress status-probe failures; record unexpected ones |
| src/Storages/StorageURL.cpp | Suppress per-option failures; record policy-relevant/terminal ones |
| src/Storages/StorageReplicatedMergeTree.cpp | Suppress retryable/speculative paths; record unexpected/terminal errors |
| src/Storages/StorageMergeTree.cpp | Suppress lock-retry path; record terminal failures |
| src/Storages/StorageMerge.cpp | Suppress “try” helpers; record unexpected failures |
| src/Storages/StorageMemory.cpp | Suppress optional backup reads; record unexpected failures |
| src/Storages/StorageInMemoryMetadata.cpp | Suppress validation probes; record unexpected failures |
| src/Storages/StorageFile.cpp | Suppress mmap probe failures; record unexpected failures |
| src/Storages/Statistics/Statistics.cpp | Suppress conversion probes for statistics |
| src/Storages/Statistics/ConditionSelectivityEstimator.cpp | Suppress parse probes; record non-parse failures |
| src/Storages/PostgreSQL/MaterializedPostgreSQLConsumer.cpp | Suppress handled mismatch/row-conversion errors; record others |
| src/Storages/ObjectStorage/StorageObjectStorageSource.cpp | Suppress non-fatal reader/format probing |
| src/Storages/ObjectStorage/StorageObjectStorage.cpp | Suppress optional discovery; record access-denied and terminal failures |
| src/Storages/ObjectStorage/DataLakes/Iceberg/IcebergMetadata.cpp | Suppress fallback schema parsing; record non-expected failures |
| src/Storages/ObjectStorage/DataLakes/DeltaLake/TableSnapshot.cpp | Suppress retryable init; record rethrown exceptions consistently |
| src/Storages/MergeTree/WhatIfStatisticalEstimator.cpp | Suppress optional statistics load probes |
| src/Storages/MergeTree/WhatIfIndexEstimator.cpp | Suppress speculative index/condition creation |
| src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp | Suppress statistics pruning probes |
| src/Storages/MergeTree/MergeTreeCommittingBlock.cpp | Minor include formatting change |
| src/Storages/MergeTree/KeyCondition.cpp | Suppress deterministic DAG evaluation probe failures |
| src/Storages/MergeTree/IMergeTreeDataPart.cpp | Replace exception-driven legacy filename check with explicit existence check |
| src/Storages/MergeTree/DataPartStorageOnDiskPacked.cpp | Suppress packed-index probe; record unexpected errors when part exists |
| src/Storages/MergeTree/ConditionTemplate.cpp | Suppress speculative predicate specialization errors |
| src/Storages/MergeTree/checkDataPart.cpp | Suppress speculative checks; record retryable/forced terminal failures |
| src/Storages/Kafka/KeeperHandlingConsumer.cpp | Suppress expected coordination outcomes; record unexpected keeper/DB exceptions |
| src/Storages/getStructureOfRemoteTable.cpp | Suppress speculative shard probes; record unexpected failures |
| src/Storages/Distributed/DistributedAsyncInsertBatch.cpp | Suppress split/send probes; record broken/terminal errors; null-check trace context |
| src/Storages/checkAndGetLiteralArgument.cpp | Suppress speculative literal parsing probes |
| src/Server/TCPHandler.cpp | Suppress SSL auth fallback probes; record unexpected auth failures |
| src/Server/PostgreSQLHandler.cpp | Suppress speculative parse failures for PostgreSQL protocol statements |
| src/Server/MySQLHandlerFactory.cpp | Suppress RSA key probing failures |
| src/Server/CloudPlacementInfo.cpp | Suppress one-time initialization probing failures |
| src/Server/ArrowFlight/ArrowFlightServer.cpp | Suppress schema-validation/probing execution paths |
| src/Processors/QueryPlan/ReadFromRemote.cpp | Suppress probe failures; record rethrown remote-connection errors |
| src/Processors/QueryPlan/Optimizations/Utils.cpp | Suppress partial-evaluation probes |
| src/Processors/QueryPlan/Optimizations/makeDistributed.cpp | Suppress common-type inference probes |
| src/Processors/QueryPlan/Optimizations/convertAnyJoinToSemiOrAntiJoin.cpp | Suppress partial-evaluation probes |
| src/Processors/QueryPlan/Optimizations/calculateHashTableCacheKeys.cpp | Suppress cache-key computation probes |
| src/Processors/Formats/RowInputFormatWithDiagnosticInfo.cpp | Suppress diagnostic deserialization probes |
| src/Processors/Formats/IRowInputFormat.cpp | Suppress handled parse errors; explicitly record terminal ones (but see review comments) |
| src/Processors/Formats/Impl/TemplateRowInputFormat.cpp | Suppress prefix/suffix parse probes; record unexpected failures |
| src/Processors/Formats/Impl/TabSeparatedRowInputFormat.cpp | Suppress delimiter/end parsing probes |
| src/Processors/Formats/Impl/Parquet/SchemaConverter.cpp | Optional suppression for schema inference; record non-skipped failures |
| src/Processors/Formats/Impl/NativeORCBlockInputFormat.cpp | Suppress ORC literal conversion probes |
| src/Processors/Formats/Impl/JSONCompactEachRowRowInputFormat.cpp | Suppress delimiter parsing probes |
| src/Processors/Formats/Impl/CSVRowInputFormat.cpp | Suppress delimiter parsing probes; parse-error-only swallowing in default path |
| src/Processors/Formats/Impl/AvroConfluentSchemaRegistry.cpp | Suppress retry attempts; record terminal failures; map Poco exceptions to explicit code |
| src/Processors/Formats/Impl/ArrowIPC/RecordBatchDecoder.cpp | Suppress buffer-reachability probing failures |
| src/Processors/Formats/Impl/ArrowIPC/ArrowIPCSchemaReader.cpp | Optional suppression for schema inference; record non-skipped failures |
| src/Parsers/ParserSetQuery.cpp | Suppress speculative setting-cast probes; record unexpected failures |
| src/Parsers/makeASTForLogicalFunction.cpp | Suppress speculative literal-bool extraction failures |
| src/Parsers/Kusto/KustoFunctions/KQLCastingFunctions.cpp | Suppress fallback conversions; record unexpected failures |
| src/Parsers/ExpressionElementParsers.cpp | Suppress speculative string-literal parsing errors; record unexpected ones |
| src/Parsers/Access/parseAccessRightsElements.cpp | Suppress speculative access-flag parsing; record unexpected failures |
| src/IO/SeekableReadBuffer.cpp | Suppress tryGetPosition probe; record unexpected failures (forced) |
| src/IO/S3/Credentials.cpp | Suppress AZ probing failures |
| src/IO/S3/copyS3File.cpp | Suppress access-denied in multipart paths; record unexpected failures |
| src/IO/ReadWriteBufferFromHTTP.cpp | Suppress retry probes; record rethrown terminal errors |
| src/IO/ReadHelpers.h | Suppress fractional-part probing; record unexpected failures |
| src/Interpreters/ServerAsynchronousMetrics.cpp | Suppress benign races; record unexpected metric failures |
| src/Interpreters/PreparedSets.cpp | Suppress optional planning probes; record unexpected failures |
| src/Interpreters/MergeTreeTransaction/VersionMetadata.cpp | Suppress speculative metadata read; record terminal failures |
| src/Interpreters/InterpreterCreateQuery.cpp | Suppress “IF NOT EXISTS” probes; record unexpected failures; refine concurrent-create handling |
| src/Interpreters/InterpreterCreateFunctionQuery.cpp | Suppress optional driver-dir probing |
| src/Interpreters/FileCache/FileSegment.cpp | Suppress benign rename races |
| src/Interpreters/DDLTask.cpp | Suppress speculative DNS/local-address probes; record unexpected failures |
| src/Interpreters/Cluster.cpp | Suppress speculative DNS parsing/resolution |
| src/Functions/parseReadableSize.cpp | Suppress error counters for OrNull/non-throwing mode |
| src/Functions/highlightQuery.cpp | Suppress parse-probe errors; record non-syntax failures |
| src/Functions/FunctionVariantAdaptor.cpp | Suppress type-probe failures; record unexpected ones |
| src/Functions/FunctionsConversion.h | Suppress non-throwing parse; record non-parse failures (forced) |
| src/Functions/FunctionsConversion.cpp | Suppress cast wrapper probe failures |
| src/Functions/FunctionFile.cpp | Suppress default-arg path failures; record unexpected ones (forced) |
| src/Functions/FunctionDynamicAdaptor.cpp | Suppress type-probe failures; record unexpected ones |
| src/Functions/formatQuery.cpp | Suppress parse probes for Null error-handling |
| src/Functions/caseWithExpression.cpp | Suppress transform-type probe failures; record unexpected ones |
| src/Formats/ReadSchemaUtils.cpp | Suppress schema-detection probes |
| src/Formats/ProtobufSerializer.cpp | Suppress probe failures; record unexpected ones |
| src/Formats/FormatSchemaInfo.cpp | Suppress temp-file write; record unexpected failures if final missing |
| src/Formats/FormatFactory.cpp | Suppress file-size probing failures |
| src/Disks/StoragePolicy.cpp | Suppress config-update probes; record unexpected failures |
| src/Disks/IO/ReadBufferFromWebServer.cpp | Suppress URL-option probing; record terminal errors on rethrow |
| src/Disks/IO/createReadBufferFromFileBase.cpp | Suppress mmap/direct-io probes; record unexpected failures |
| src/Disks/IO/CachedOnDiskWriteBufferFromFile.cpp | Suppress destructor/finalize probes; record terminal failures |
| src/Disks/IO/CachedOnDiskReadBufferFromFile.cpp | Suppress rename races; record unexpected failures |
| src/Disks/DiskObjectStorage/ObjectStorages/Web/WebObjectStorage.cpp | Suppress HEAD probes; record terminal errors on rethrow |
| src/Disks/DiskObjectStorage/ObjectStorages/S3/S3ObjectStorage.cpp | Suppress metadata probe; record terminal failures |
| src/Disks/DiskLocal.cpp | Suppress access check probe; record terminal failures; mark disk broken |
| src/DataTypes/Serializations/SimpleTextSerialization.h | Suppress try-deserialize parse errors; record non-parse failures |
| src/DataTypes/Serializations/SerializationTuple.cpp | Suppress non-throwing parse; record non-parse failures |
| src/DataTypes/Serializations/SerializationString.cpp | Suppress non-throwing parse; record non-parse failures |
| src/DataTypes/Serializations/SerializationMap.cpp | Suppress non-throwing parse; record non-parse failures |
| src/DataTypes/Serializations/SerializationFixedString.cpp | Suppress try-read parse; record non-parse failures |
| src/DataTypes/Serializations/SerializationCustomSimpleText.cpp | Suppress try-deserialize parse errors; record non-parse failures |
| src/DataTypes/Serializations/SerializationArray.cpp | Suppress non-throwing parse; record non-parse failures |
| src/DataTypes/Serializations/ISerialization.cpp | Suppress try-deserialize parse errors; record non-parse failures |
| src/DataTypes/DataTypeMap.cpp | Suppress optional subcolumn parse; keep strict throwing path |
| src/DataTypes/DataTypeFactory.cpp | Suppress try-get datatype probes |
| src/Databases/PostgreSQL/DatabaseMaterializedPostgreSQL.cpp | Suppress probe construction while fetching CREATE query |
| src/Databases/MySQL/DatabaseMySQL.cpp | Suppress cache-fetch probe failures |
| src/Databases/DDLDependencyVisitor.cpp | Suppress probe parsing; record/throw when contract requires it |
| src/Databases/DataLake/RestCatalog.cpp | Suppress probe requests; record non-expected HTTP/DB failures |
| src/Databases/DataLake/PaimonRestCatalog.cpp | Suppress probe requests; record non-expected HTTP/DB failures |
| src/Databases/DataLake/DatabaseDataLake.cpp | Suppress per-table probes; record exceptions when futures rethrow |
| src/Databases/DatabaseS3.cpp | Suppress “tryGetTable” probes; force-record some unexpected failures |
| src/Databases/DatabaseReplicatedWorker.cpp | Suppress coordination probe; force-record unexpected DB exceptions |
| src/Databases/DatabaseReplicated.cpp | Suppress cluster/zk probes; force-record unexpected failures |
| src/Databases/DatabaseHDFS.cpp | Suppress “tryGetTable” probes; force-record some unexpected failures |
| src/Core/ServerUUID.cpp | Suppress UUID read probes; force-record unexpected failures |
| src/Coordination/Changelog.cpp | Suppress torn-tail read probes; record unexpected failures (forced) |
| src/Compression/CompressionFactory.cpp | Suppress codec-probe failures; record unexpected errors |
| src/Common/tests/gtest_execution_status.cpp | New unit test ensuring try-deserialize doesn’t record handled errors |
| src/Common/tests/gtest_exception.cpp | Expanded unit tests for suppression nesting, forcing, and thread-locality |
| src/Common/SymbolIndex.cpp | Suppress filesystem probing failures while collecting symbols |
| src/Common/Scheduler/CPULeaseAllocation.cpp | Suppress benign shutdown races; record unexpected failures |
| src/Common/QueryFuzzer.cpp | Suppress speculative factory probes |
| src/Common/OpenTelemetryTraceContext.cpp | Suppress attribute supplier failures |
| src/Common/NamedCollections/NamedCollectionsMetadataStorage.cpp | Suppress concurrent-update races; record unexpected failures |
| src/Common/MemoryWorker.cpp | Suppress expected OS metric errors; force-record unexpected ones |
| src/Common/HTTPConnectionPool.cpp | Suppress preserve-connection probe; force-record unexpected failures |
| src/Common/Exception.h | Update API/docs: nested suppression + recordToSystemErrors(force) |
| src/Common/Exception.cpp | Implement nested suppression depth + forced recording |
| src/Common/CounterInFile.h | Suppress partial-read probes; record unexpected failures |
| src/Common/AsynchronousMetrics.cpp | Suppress expected OS metric errors; force-record unexpected ones |
| src/Client/TerminalKeystrokeInterceptor.cpp | Suppress teardown failures |
| src/Client/Suggest.cpp | Suppress retry probes; record terminal/unexpected failures |
| src/Client/HedgedConnectionsFactory.cpp | Suppress resume probes; record terminal failures |
| src/Client/ConnectionPoolWithFailover.cpp | Suppress resume probes; record terminal failures |
| src/Client/ConnectionEstablisher.cpp | Suppress reconnect probes; record unexpected failures |
| src/Client/Connection.cpp | Suppress connect probes; record terminal failures on final address |
| src/Client/ClientBaseHelpers.cpp | Suppress highlighting parse probes |
| src/Client/ClientBase.cpp | Suppress IO/probe failures; ensure terminal errors are recorded |
| src/BridgeHelper/XDBCBridgeHelper.h | Suppress HTTP ping probe failures |
| src/BridgeHelper/ExternalDictionaryLibraryBridgeHelper.cpp | Suppress handshake probes |
| src/BridgeHelper/CatBoostLibraryBridgeHelper.cpp | Suppress handshake probes |
| src/Backups/BackupEntriesCollector.cpp | Suppress transient inconsistency probes; record terminal failures |
| src/Analyzer/SetUtils.cpp | Suppress enum conversion probes; record unexpected failures |
| src/Analyzer/Resolve/resolveFunction.cpp | Suppress function-probe failures; record unexpected ones |
| src/Analyzer/Resolve/QueryAnalyzer.cpp | Suppress speculative resolution probe; record unexpected errors |
| src/Analyzer/Resolve/IdentifierResolver.cpp | Suppress refresh probe failures; record unexpected ones |
| src/Analyzer/Passes/ConvertOrLikeChainPass.cpp | Suppress expected escape parse failure; record unexpected ones |
| src/Analyzer/ConstantNode.cpp | Suppress AST conversion probes |
| src/Access/ZooKeeperReplicator.cpp | Suppress retry probes; record terminal keeper/DB exceptions |
| src/Access/SettingsConstraints.cpp | Suppress speculative casts/compares |
| src/Access/SettingsAuthResponseParser.cpp | Suppress parse probes; force-record unexpected failures |
| src/Access/IAccessStorage.cpp | Suppress cascade-read probes; force-record unexpected failures |
| src/Access/DiskAccessStorage.cpp | Suppress list/cleanup probes |
| programs/server/Server.cpp | Suppress Linux sanity-check probes |
Comments suppressed due to low confidence (6)
src/Processors/Formats/IRowInputFormat.cpp:202
- This
recordToSystemErrorscall is inside a scope whereSuppressErrorCodesScopeis still active (line 112), so it won't actually record suppressed exceptions unlessforce=true. If the error is terminal (and it is, since it is rethrown), it should be recorded here.
src/Processors/Formats/IRowInputFormat.cpp:218 - This branch throws after exceeding the allowed error ratio, but while
SuppressErrorCodesScopeis still active (line 112). Withoutforce=true,recordToSystemErrorswon't record the suppressed exception before it propagates.
src/Processors/Formats/IRowInputFormat.cpp:225 - This error is rethrown as terminal, but
recordToSystemErrorswon't record it whileSuppressErrorCodesScopeis active (line 112) unlessforce=true.
src/Processors/Formats/IRowInputFormat.cpp:245 - In this outer catch,
SuppressErrorCodesScope(line 112) is still active, so thisrecordToSystemErrorscall will not record suppressed exceptions. If the goal is to record terminal connection errors, this needsforce=true(or the suppression scope should be narrowed).
src/Processors/Formats/IRowInputFormat.cpp:262 - This branch rethrows, but
SuppressErrorCodesScopeis still active (line 112), sorecordToSystemErrorswill not record suppressed exceptions unless forced.
src/Processors/Formats/IRowInputFormat.cpp:283 - This is the terminal parse-error path (adds verbose diagnostics and rethrows), but
SuppressErrorCodesScopefrom earlier in the function is still active, sorecordToSystemErrorswon't record the suppressed exception unless forced.
Initialize variables split by suppression scopes and annotate intentional empty catches and an analyzer-only test false positive.
Share delayed error-index state across exception copies and serialize recording so one suppressed occurrence increments system error counters only once.
Capture optional local-query suppression and install it explicitly on pulling-pipeline workers without changing ordinary executor users.
Record consumed storage failures and restore saved connection failures whenever a stale-local fallback also exits exceptionally.
Install suppression once per materialized column block instead of once per value while preserving unexpected-error recording.
…stem-errors # Conflicts: # src/Databases/DataLake/PaimonRestCatalog.cpp
Drop the draft-only exception audit and move the stateless regression to the next available number after merging current master.
Clear the source exception's recording marker before moving its base subobject so clang-tidy does not diagnose a use-after-move. CI: https://github.com/ClickHouse/ClickHouse/actions/runs/30296096878/job/90077870078
Keep syntax failures suppressed for `formatQueryOrNull`, but force-record parser resource failures before returning `NULL`. Cover the parser depth limit in the exception-accounting regression test.
Preserve the `file` function's handled-error suppression around master's path-boundary check, remove the deleted library dictionary bridge, and renumber the regression test to `04652`. Mark the intentional moved-from exception assertions so `arm_tidy` does not reject the test. CI: https://github.com/ClickHouse/ClickHouse/actions/runs/30305591162/job/90109329189
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 172 out of 172 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (3)
src/Functions/FunctionFile.cpp:165
- When handling
file(path, default)/file(path, NULL), roll backres_charsto the per-row starting size before recording/inserting the fallback value; otherwise a throwncopyDatacan leave partial bytes in the result string.
src/Functions/FunctionFile.cpp:178 - The generic
catch (...)fallback should also roll backres_charsto the per-row starting size before inserting the default/NULL; otherwise partial bytes appended before the exception can leak into the result string.
src/Functions/FunctionFile.cpp:150 - If
copyData(in, out)throws after partially appending tores_chars, the catch blocks currently insert the default/NULL on top of already-appended bytes. Capture the startingres_chars.size()for each row so the catch blocks can roll back any partial writes before applying the fallback value.
This issue also appears in the following locations of the same file:
- line 162
- line 175
`ExecutionStatus::tryDeserializeText` now returns false only for malformed serialized payloads. It records and rethrows unexpected `DB::Exception`s and lets other exception types propagate. Add deterministic coverage for the unexpected-error path while preserving the target status.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 172 out of 172 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
tests/performance/casts_from_string.xml:18
<drop_query>is placed before the benchmark<query>elements, so the table will be dropped before the queries run (pertests/performance/README.md, teardown queries should come after benchmark queries). This would make the queries fail with an unknown table error and invalidate the perf test.
| UInt8 higher_order = 0; | ||
| try | ||
| { | ||
| Exception::SuppressErrorCodesScope suppress_error_codes; |
There was a problem hiding this comment.
The new suppression scope wraps the whole FunctionFactory::tryGet / trait probe, but this catch still just logs and falls back to default NULL values. Because name already comes from getAllRegisteredNames(), any DB::Exception here is no longer ordinary "function not found" noise; it is an unexpected resolver failure or bug during system.functions introspection.
With suppression active, those consumed failures now disappear from system.errors entirely, which reopens the same "unexpected consumed exception is silent" hole this PR fixed in system.tables. If some resolver-specific codes are genuinely expected here they need to be split out explicitly; otherwise this path should re-record the exception before defaulting the columns.
| UInt64 total_size = 0; | ||
| try | ||
| { | ||
| Exception::SuppressErrorCodesScope suppress_error_codes; |
There was a problem hiding this comment.
This helper only expects the detached part to disappear concurrently, but the new blanket SuppressErrorCodesScope plus the catch-all below now hides every other DB::Exception from the disk backend as well. On object-storage-backed volumes or other real disk/metadata failures, system.detached_parts will quietly return a truncated bytes_on_disk value while nothing reaches system.errors.
That is broader than the PR contract of suppressing only handled/speculative failures. This needs the same split as system.tables: keep the disappearing-path race quiet, but re-record unexpected backend exceptions before returning the partial size.
|
Dear @pamarcos, this PR hasn't been updated for a while. Will you continue working on it? If not, please close it. Otherwise, ignore this message. |
Handled speculative parser probes, retries, and fallbacks could populate
system.errorsandsystem.error_logeven when the operation later succeeded. Nested suppression now lets the outerowner decide whether a failure is terminal, while consumed unexpected failures can still be recorded.
Copies of a suppressed exception share delayed-recording state, making restoration idempotent across
copies and concurrent callers. Suppression is propagated explicitly to optional local-query pipeline
workers and is installed once per materialized column block rather than once per value.
Two local seven-run comparisons over 50 million materialized strings measured
parseReadableSizeOrZeroand
parseReadableSizeOrNull3-4% faster after scope hoisting; String-to-BoolaccurateCastOrNullremained neutral.
Related: #111141
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Handled parser probes, tolerant deserialization, and recovered HTTP/URL retry and failover attempts no longer add spurious entries to
system.errorsandsystem.error_log; exhausted attempts remain recorded.