mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-13 09:52:38 +00:00
604cec475a
In case of restoring from current_batch.txt it is possible that the some file from the batch will not be exist, and the fix submitted in #49884 was not complete, since it will fail later in markAsSend() (due to it tries to obtain file size there): 2023.12.04 05:43:12.676658 [ 5006 ] {} <Error> dist.DirectoryMonitor.work4: std::exception. Code: 1001, type: std::__1::__fs::filesystem::filesystem_error, e.what() = filesystem error: in file_size: No such file or directory ["/work4/clickhouse/data/dist/shard8_all_replicas//150426396.bin"], Stack trace (when copying this message, always include the lines below): 0. ./.build/./contrib/llvm-project/libcxx/include/exception:134: std::runtime_error::runtime_error(String const&) @ 0x00000000177e83f4 in /usr/lib/debug/usr/bin/clickhouse.debug 1. ./.build/./contrib/llvm-project/libcxx/include/string:1499: std::system_error::system_error(std::error_code, String const&) @ 0x00000000177f0fd5 in /usr/lib/debug/usr/bin/clickhouse.debug 2. ./.build/./contrib/llvm-project/libcxx/include/__filesystem/filesystem_error.h:42: std::__fs::filesystem::filesystem_error::filesystem_error[abi:v15000](String const&, std::__fs::filesystem::path const&, std::error_code) @ 0x000000000b844ca1 in /usr/lib/debug/usr/bin/clickhouse.debug 3. ./.build/./contrib/llvm-project/libcxx/include/__filesystem/filesystem_error.h:90: void std::__fs::filesystem::__throw_filesystem_error[abi:v15000]<String&, std::__fs::filesystem::path const&, std::error_code const&>(String&, std::__fs::filesystem::path const&, std::error_code const&) @ 0x000000001778f953 in /usr/lib/debug/usr/bin/clickhouse.debug 4. ./.build/./contrib/llvm-project/libcxx/src/filesystem/filesystem_common.h:0: std::__fs::filesystem::detail::(anonymous namespace)::ErrorHandler<unsigned long>::report(std::error_code const&) const @ 0x0000000017793ef7 in /usr/lib/debug/usr/bin/clickhouse.debug 5. ./.build/./contrib/llvm-project/libcxx/src/filesystem/operations.cpp:0: std::__fs::filesystem::__file_size(std::__fs::filesystem::path const&, std::error_code*) @ 0x0000000017793e26 in /usr/lib/debug/usr/bin/clickhouse.debug 6. ./.build/./src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp:707: DB::DistributedAsyncInsertDirectoryQueue::markAsSend(String const&) @ 0x0000000011cd92c5 in /usr/lib/debug/usr/bin/clickhouse.debug 7. ./.build/./contrib/llvm-project/libcxx/include/__iterator/wrap_iter.h💯 DB::DistributedAsyncInsertBatch::send() @ 0x0000000011cdd81c in /usr/lib/debug/usr/bin/clickhouse.debug 8. ./.build/./src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp:0: DB::DistributedAsyncInsertDirectoryQueue::processFilesWithBatching() @ 0x0000000011cd5054 in /usr/lib/debug/usr/bin/clickhouse.debug 9. ./.build/./src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp:417: DB::DistributedAsyncInsertDirectoryQueue::processFiles() @ 0x0000000011cd3440 in /usr/lib/debug/usr/bin/clickhouse.debug 10. ./.build/./src/Storages/Distributed/DistributedAsyncInsertDirectoryQueue.cpp:0: DB::DistributedAsyncInsertDirectoryQueue::run() @ 0x0000000011cd3878 in /usr/lib/debug/usr/bin/clickhouse.debug 11. ./.build/./contrib/llvm-project/libcxx/include/__functional/function.h:0: DB::BackgroundSchedulePoolTaskInfo::execute() @ 0x00000000103dbc34 in /usr/lib/debug/usr/bin/clickhouse.debug 12. ./.build/./contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:701: DB::BackgroundSchedulePool::threadFunction() @ 0x00000000103de1b6 in /usr/lib/debug/usr/bin/clickhouse.debug 13. ./.build/./src/Core/BackgroundSchedulePool.cpp:0: void std::__function::__policy_invoker<void ()>::__call_impl<std::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<false>::ThreadFromGlobalPoolImpl<DB::BackgroundSchedulePool::BackgroundSchedulePool(unsigned long, StrongTypedef<unsigned long, CurrentMetrics::MetricTag>, StrongTypedef<unsigned long, CurrentMetrics::MetricTag>, char const*)::$_0>(DB::BackgroundSchedulePool::BackgroundSchedulePool(unsigned long, StrongTypedef<unsigned long, CurrentMetrics::MetricTag>, StrongTypedef<unsigned long, CurrentMetrics::MetricTag>, char const*)::$_0&&)::'lambda'(), void ()>>(std::__function::__policy_storage const*) @ 0x00000000103de7d1 in /usr/lib/debug/usr/bin/clickhouse.debug 14. ./.build/./base/base/../base/wide_integer_impl.h:809: ThreadPoolImpl<std::thread>::worker(std::__list_iterator<std::thread, void*>) @ 0x000000000b8c5502 in /usr/lib/debug/usr/bin/clickhouse.debug 15. ./.build/./contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:302: void* std::__thread_proxy[abi:v15000]<std::tuple<std::unique_ptr<std::__thread_struct, std::default_delete<std::__thread_struct>>, void ThreadPoolImpl<std::thread>::scheduleImpl<void>(std::function<void ()>, Priority, std::optional<unsigned long>, bool)::'lambda0'()>>(void*) @ 0x000000000b8c936e in /usr/lib/debug/usr/bin/clickhouse.debug 16. ? @ 0x00007f1be8b30fd4 in ? 17. ? @ 0x00007f1be8bb15bc in ? And instead of ignoring errors, DistributedAsyncInsertBatch::valid() had been added, that should be called when the files had been read from the current_batch.txt, if it is not valid (some files from the batch did not exist), then there is no sense in trying to send the same batch, so just this file will be ignored, and files will be processed in a regular order. Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com> |
||
---|---|---|
.. | ||
Cache | ||
DataLakes | ||
Distributed | ||
examples | ||
FileLog | ||
fuzzers | ||
HDFS | ||
Hive | ||
Kafka | ||
LiveView | ||
MergeTree | ||
MySQL | ||
NATS | ||
PostgreSQL | ||
RabbitMQ | ||
RocksDB | ||
S3Queue | ||
Statistics | ||
System | ||
tests | ||
WindowView | ||
AlterCommands.cpp | ||
AlterCommands.h | ||
BlockNumberColumn.cpp | ||
BlockNumberColumn.h | ||
buildQueryTreeForShard.cpp | ||
buildQueryTreeForShard.h | ||
checkAndGetLiteralArgument.cpp | ||
checkAndGetLiteralArgument.h | ||
CheckResults.h | ||
CMakeLists.txt | ||
ColumnDefault.cpp | ||
ColumnDefault.h | ||
ColumnDependency.h | ||
ColumnsDescription.cpp | ||
ColumnsDescription.h | ||
CompressionCodecSelector.h | ||
ConstraintsDescription.cpp | ||
ConstraintsDescription.h | ||
DataDestinationType.h | ||
ExecutableSettings.cpp | ||
ExecutableSettings.h | ||
ExternalDataSourceConfiguration.cpp | ||
ExternalDataSourceConfiguration.h | ||
extractKeyExpressionList.cpp | ||
extractKeyExpressionList.h | ||
extractTableFunctionArgumentsFromSelectQuery.cpp | ||
extractTableFunctionArgumentsFromSelectQuery.h | ||
Freeze.cpp | ||
Freeze.h | ||
getStructureOfRemoteTable.cpp | ||
getStructureOfRemoteTable.h | ||
IMessageProducer.cpp | ||
IMessageProducer.h | ||
IndicesDescription.cpp | ||
IndicesDescription.h | ||
IStorage_fwd.h | ||
IStorage.cpp | ||
IStorage.h | ||
IStorageCluster.cpp | ||
IStorageCluster.h | ||
KeyDescription.cpp | ||
KeyDescription.h | ||
KVStorageUtils.cpp | ||
KVStorageUtils.h | ||
LightweightDeleteDescription.cpp | ||
LightweightDeleteDescription.h | ||
MarkCache.h | ||
MemorySettings.cpp | ||
MemorySettings.h | ||
MessageQueueSink.cpp | ||
MessageQueueSink.h | ||
MutationCommands.cpp | ||
MutationCommands.h | ||
NamedCollectionsHelpers.cpp | ||
NamedCollectionsHelpers.h | ||
PartitionCommands.cpp | ||
PartitionCommands.h | ||
PartitionedSink.cpp | ||
PartitionedSink.h | ||
prepareReadingFromFormat.cpp | ||
prepareReadingFromFormat.h | ||
ProjectionsDescription.cpp | ||
ProjectionsDescription.h | ||
ReadFinalForExternalReplicaStorage.cpp | ||
ReadFinalForExternalReplicaStorage.h | ||
ReadInOrderOptimizer.cpp | ||
ReadInOrderOptimizer.h | ||
RedisCommon.cpp | ||
RedisCommon.h | ||
registerStorages.cpp | ||
registerStorages.h | ||
removeGroupingFunctionSpecializations.cpp | ||
removeGroupingFunctionSpecializations.h | ||
RenamingRestrictions.h | ||
ReplaceAliasByExpressionVisitor.cpp | ||
ReplaceAliasByExpressionVisitor.h | ||
SelectQueryDescription.cpp | ||
SelectQueryDescription.h | ||
SelectQueryInfo.cpp | ||
SelectQueryInfo.h | ||
SetSettings.cpp | ||
SetSettings.h | ||
StatisticsDescription.cpp | ||
StatisticsDescription.h | ||
StorageAzureBlob.cpp | ||
StorageAzureBlob.h | ||
StorageAzureBlobCluster.cpp | ||
StorageAzureBlobCluster.h | ||
StorageBuffer.cpp | ||
StorageBuffer.h | ||
StorageConfiguration.h | ||
StorageDictionary.cpp | ||
StorageDictionary.h | ||
StorageDistributed.cpp | ||
StorageDistributed.h | ||
StorageDummy.cpp | ||
StorageDummy.h | ||
StorageExecutable.cpp | ||
StorageExecutable.h | ||
StorageExternalDistributed.cpp | ||
StorageExternalDistributed.h | ||
StorageFactory.cpp | ||
StorageFactory.h | ||
StorageFile.cpp | ||
StorageFile.h | ||
StorageFileCluster.cpp | ||
StorageFileCluster.h | ||
StorageFuzzJSON.cpp | ||
StorageFuzzJSON.h | ||
StorageGenerateRandom.cpp | ||
StorageGenerateRandom.h | ||
StorageInMemoryMetadata.cpp | ||
StorageInMemoryMetadata.h | ||
StorageInput.cpp | ||
StorageInput.h | ||
StorageJoin.cpp | ||
StorageJoin.h | ||
StorageKeeperMap.cpp | ||
StorageKeeperMap.h | ||
StorageLog.cpp | ||
StorageLog.h | ||
StorageLogSettings.cpp | ||
StorageLogSettings.h | ||
StorageMaterializedMySQL.cpp | ||
StorageMaterializedMySQL.h | ||
StorageMaterializedView.cpp | ||
StorageMaterializedView.h | ||
StorageMemory.cpp | ||
StorageMemory.h | ||
StorageMerge.cpp | ||
StorageMerge.h | ||
StorageMergeTree.cpp | ||
StorageMergeTree.h | ||
StorageMongoDB.cpp | ||
StorageMongoDB.h | ||
StorageMongoDBSocketFactory.cpp | ||
StorageMongoDBSocketFactory.h | ||
StorageMySQL.cpp | ||
StorageMySQL.h | ||
StorageNull.cpp | ||
StorageNull.h | ||
StoragePostgreSQL.cpp | ||
StoragePostgreSQL.h | ||
StorageProxy.h | ||
StorageRedis.cpp | ||
StorageRedis.h | ||
StorageReplicatedMergeTree.cpp | ||
StorageReplicatedMergeTree.h | ||
StorageS3.cpp | ||
StorageS3.h | ||
StorageS3Cluster.cpp | ||
StorageS3Cluster.h | ||
StorageS3Settings.cpp | ||
StorageS3Settings.h | ||
StorageSet.cpp | ||
StorageSet.h | ||
StorageSnapshot.cpp | ||
StorageSnapshot.h | ||
StorageSQLite.cpp | ||
StorageSQLite.h | ||
StorageStripeLog.cpp | ||
StorageStripeLog.h | ||
StorageTableFunction.h | ||
StorageURL.cpp | ||
StorageURL.h | ||
StorageURLCluster.cpp | ||
StorageURLCluster.h | ||
StorageValues.cpp | ||
StorageValues.h | ||
StorageView.cpp | ||
StorageView.h | ||
StorageXDBC.cpp | ||
StorageXDBC.h | ||
TableLockHolder.h | ||
transformQueryForExternalDatabase.cpp | ||
transformQueryForExternalDatabase.h | ||
transformQueryForExternalDatabaseAnalyzer.cpp | ||
transformQueryForExternalDatabaseAnalyzer.h | ||
TTLDescription.cpp | ||
TTLDescription.h | ||
TTLMode.h | ||
UVLoop.h | ||
VirtualColumnUtils.cpp | ||
VirtualColumnUtils.h |