90.84% (238/262) Uncovered changed code (with context): ================================================================================ src/Processors/Executors/PipelineExecutor.cpp ================================================================================ --- uncovered block 268-268 --- 266 | all_processors_finished = false; 267 | if (!is_cancelled) >> 268 | break; 269 | } 270 | } ================================================================================ src/Processors/Formats/IOutputFormat.h ================================================================================ --- uncovered block 138-138 --- 136 | virtual void consume(Chunk) = 0; 137 | virtual void consumeTotals(Chunk) {} >> 138 | virtual void consumeExtremes(Chunk) {} 139 | virtual void finalizeImpl() {} 140 | virtual void finalizeBuffers() {} --- uncovered block 148-148 --- 146 | /// Override to write the deferred statistics section and close the document. 147 | /// Called in phase 2 after all progress from connection draining has been collected. >> 148 | virtual void writeDeferredStatisticsAndFinalize() {} 149 | virtual void writePrefix() {} 150 | virtual void writeSuffix() {} ================================================================================ src/Processors/Formats/Impl/ParallelFormattingOutputFormat.cpp ================================================================================ --- uncovered block 58-58 --- 56 | formatter->finalizeImpl(); 57 | if (formatter->hasDeferredStatistics()) >> 58 | formatter->writeDeferredStatisticsAndFinalize(); 59 | } 60 | ================================================================================ src/Processors/Formats/Impl/XMLRowOutputFormat.cpp ================================================================================ --- uncovered block 196-196 --- 194 | writeException(); 195 | else if (format_settings.write_statistics && !hasDeferredStatistics()) >> 196 | writeStatistics(); 197 | 198 | /// When statistics are deferred, skip closing the document here. ================================================================================ src/Processors/Sources/RemoteSource.cpp ================================================================================ --- uncovered block 271-271 --- 269 | 270 | if (!cancel_reason.compare_exchange_strong(expected, reason, std::memory_order_acq_rel)) >> 271 | return; 272 | 273 | try --- uncovered block 285-285 --- 283 | catch (...) 284 | { >> 285 | tryLogCurrentException(getLogger("RemoteSource"), "Error occurs on cancellation upgrade."); 286 | } 287 | } ================================================================================ src/QueryPipeline/RemoteQueryExecutor.cpp ================================================================================ --- uncovered block 759-759 --- 757 | 758 | case Protocol::Server::TimezoneUpdate: >> 759 | break; 760 | 761 | default: --- uncovered block 761-765 --- 759 | break; 760 | >> 761 | default: >> 762 | got_unknown_packet_from_replica.store(true, std::memory_order_release); >> 763 | throw Exception( >> 764 | ErrorCodes::UNKNOWN_PACKET_FROM_SERVER, >> 765 | "Unknown packet {} from one of the following replicas: {}", 766 | packet.type, 767 | connections->dumpAddresses()); --- uncovered block 851-851 --- 849 | /// If connections weren't created yet, query wasn't sent or was already finished, nothing to do. 850 | if (!connections || !sent_query || finished) >> 851 | return; 852 | } 853 | --- uncovered block 886-886 --- 884 | /// without waiting for the drain to complete. 885 | if (drain_should_stop.load(std::memory_order_acquire)) >> 886 | break; 887 | 888 | Packet packet = connections->receivePacket(); --- uncovered block 897-897 --- 895 | break; 896 | >> 897 | case Protocol::Server::Exception: 898 | /// We just called `tryCancel` above before entering this drain loop, which sends 899 | /// `Cancel` to the replicas. A replica that was actively processing responds with --- uncovered block 913-914 --- 911 | /// still active, and would cause subsequent `finish` / `cancelUnlocked` calls to 912 | /// return early as if a real replica error had occurred. >> 913 | if (packet.exception->code() == ErrorCodes::QUERY_WAS_CANCELLED_BY_CLIENT >> 914 | || packet.exception->code() == ErrorCodes::QUERY_WAS_CANCELLED) 915 | { 916 | if (log) --- uncovered block 916-918 --- 914 | || packet.exception->code() == ErrorCodes::QUERY_WAS_CANCELLED) 915 | { >> 916 | if (log) >> 917 | LOG_TRACE(log, "Replica reported expected cancellation during drain: {}", packet.exception->displayText()); >> 918 | break; 919 | } 920 | got_exception_from_replica.store(true, std::memory_order_release); --- uncovered block 920-922 --- 918 | break; 919 | } >> 920 | got_exception_from_replica.store(true, std::memory_order_release); >> 921 | packet.exception->rethrow(); >> 922 | break; 923 | 924 | case Protocol::Server::Log: === Lost Baseline Coverage: 5 lines === ================================================================================ src/Client/ClientBase.cpp ================================================================================ --- lost coverage block 2399-2399 --- 2397 | 2398 | if (!connection->checkConnected(connection_parameters.timeouts)) >> 2399 | connect(); 2400 | 2401 | applySettingsFromServerIfNeeded(); // after connect() and applySettingsFromQuery() ================================================================================ src/Processors/Formats/Impl/XMLRowOutputFormat.cpp ================================================================================ --- lost coverage block 196-196 --- 194 | writeException(); 195 | else if (format_settings.write_statistics && !hasDeferredStatistics()) >> 196 | writeStatistics(); 197 | 198 | /// When statistics are deferred, skip closing the document here. ================================================================================ src/Server/TCPHandler.cpp ================================================================================ --- lost coverage block 1249-1250 --- 1247 | } 1248 | >> 1249 | chassert(server.isCancelled()); >> 1250 | throw Exception(ErrorCodes::ABORTED, "Server shutdown is called"); 1251 | } 1252 | --- lost coverage block 2958-2958 --- 2956 | 2957 | if (out->isCanceled()) >> 2958 | return; 2959 | 2960 | writeVarUInt(Protocol::Server::Log, *out); WARNING: Failed to get start time for [Print Uncovered Code] - start time and duration won't be set --- Coverage counts --- Lines : baseline 770,876/916,296 -> current 770,917/916,461 (delta +41 / +165) Functions : baseline 885,170/968,553 -> current 885,215/968,570 (delta +45 / +17) Branches : baseline 251,544/328,644 -> current 251,519/328,718 (delta -25 / +74)