ClickHouse/src/Storages
Azat Khuzhin 19458a0c61 Fix removing of parts in a Temporary state
Parts in a temporary state is not exists in data_parts_by_info, so do
not try to search there and throw LOGICAL_ERROR in case of failure:

<details>

```
    02:45:49.037546 [ 5890 ] {} <Error> test_iy9rta.concurrent_kill_4 (526aa7c8-db2a-4f0e-926a-a7c8db2a9f0e): Code: 40. DB::Exception: Part all_0_0_0_1 from r11 has different columns hash. (CHECKSUM_DOESNT_MATCH) (version 21.10.1.7910 (official build)). Data after mutation is not byte-identical to data on another replicas. We will download merged part from replica to force byte-identical result.
    02:45:49.049422 [ 5890 ] {} <Trace> test_iy9rta.concurrent_kill_4 (526aa7c8-db2a-4f0e-926a-a7c8db2a9f0e): Trying to immediately remove part all_0_0_0_1 (state Temporary)
    02:45:49.060210 [ 5890 ] {} <Fatal> : Logical error: 'Part all_0_0_0_1 doesn't exist'.
    02:47:01.572508 [ 29208 ] {} <Fatal> BaseDaemon: (version 21.10.1.7910 (official build), build id: 9309CECED9A0D32CBB00BB8EC77B91456679868E) (from thread 5890) (no query) Received signal Aborted (6)
    ...
    02:47:06.815000 [ 29208 ] {} <Fatal> BaseDaemon: 8. ./obj-x86_64-linux-gnu/../src/Storages/MergeTree/MergeTreeData.cpp:2593: DB::MergeTreeData::tryRemovePartImmediately(std::__1::shared_ptr<DB::IMergeTreeDataPart const>&&) @ 0x1f959e0d in /usr/bin/clickhouse
    02:47:06.816309 [ 29209 ] {} <Fatal> BaseDaemon: 8. ./obj-x86_64-linux-gnu/../src/Storages/MergeTree/MergeTreeData.cpp:2593: DB::MergeTreeData::tryRemovePartImmediately(std::__1::shared_ptr<DB::IMergeTreeDataPart const>&&) @ 0x1f959e0d in /usr/bin/clickhouse
    02:47:09.455665 [ 29208 ] {} <Fatal> BaseDaemon: 9. ./obj-x86_64-linux-gnu/../src/Storages/StorageReplicatedMergeTree.cpp:1939: DB::StorageReplicatedMergeTree::tryExecutePartMutation(DB::ReplicatedMergeTreeLogEntry const&) @ 0x1f5f2bf6 in /usr/bin/clickhouse
    02:47:09.468738 [ 29209 ] {} <Fatal> BaseDaemon: 9. ./obj-x86_64-linux-gnu/../src/Storages/StorageReplicatedMergeTree.cpp:1939: DB::StorageReplicatedMergeTree::tryExecutePartMutation(DB::ReplicatedMergeTreeLogEntry const&) @ 0x1f5f2bf6 in /usr/bin/clickhouse
    02:47:11.776857 [ 29208 ] {} <Fatal> BaseDaemon: 10. ./obj-x86_64-linux-gnu/../src/Storages/StorageReplicatedMergeTree.cpp:1581: DB::StorageReplicatedMergeTree::executeLogEntry(DB::ReplicatedMergeTreeLogEntry&) @ 0x1f5e484c in /usr/bin/clickhouse
    02:47:11.904232 [ 29209 ] {} <Fatal> BaseDaemon: 10. ./obj-x86_64-linux-gnu/../src/Storages/StorageReplicatedMergeTree.cpp:1581: DB::StorageReplicatedMergeTree::executeLogEntry(DB::ReplicatedMergeTreeLogEntry&) @ 0x1f5e484c in /usr/bin/clickhouse
    02:47:13.941811 [ 29208 ] {} <Fatal> BaseDaemon: 11. ./obj-x86_64-linux-gnu/../src/Storages/StorageReplicatedMergeTree.cpp:3176: DB::StorageReplicatedMergeTree::processQueueEntry(std::__1::shared_ptr<DB::ReplicatedMergeTreeQueue::SelectedEntry>)::$_18::operator() shared_ptr<DB::ReplicatedMergeTreeLogEntry>&) const @ 0x1f65faa5 in /usr/bin/clickhouse
    02:47:14.477158 [ 29209 ] {} <Fatal> BaseDaemon: 11. ./obj-x86_64-linux-gnu/../src/Storages/StorageReplicatedMergeTree.cpp:3176: DB::StorageReplicatedMergeTree::processQueueEntry(std::__1::shared_ptr<DB::ReplicatedMergeTreeQueue::SelectedEntry>)::$_18::operator() shared_ptr<DB::ReplicatedMergeTreeLogEntry>&) const @ 0x1f65faa5 in /usr/bin/clickhouse
    02:47:16.475373 [ 29208 ] {} <Fatal> BaseDaemon: 12. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/type_traits:3676: decltype(std::__1::forward<DB::StorageReplicatedMergeTree::processQueueEntry(std::__1::shared_ptr<DB::ReplicatedMergeTreeQueue::SelectedEntry>))(std::__1::forward<std::__1::shared_ptr<DB::ReplicatedMergeTreeLogEntry>&>(fp0))) std::__1::__invoke<DB::StorageReplicatedMergeTree::processQueueEntry(std::__1::shared_ptr<DB::ReplicatedMergeTreeQueue::SelectedEntry>)::$_18&, std::__1::shared_ptr<DB::ReplicatedMEntry>&>(DB::StorageReplicatedMergeTree::processQueueEntry(std::__1::shared_ptr<DB::ReplicatedMergeTreeQueue::SelectedEntry>)::$_18&, std::__1::shared_ptr<DB::ReplicatedMergeTreeLogEntry>&) @ 0x1f65fa32 in /usr/bin/clickhouse
    02:47:16.970325 [ 29209 ] {} <Fatal> BaseDaemon: 12. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/type_traits:3676: decltype(std::__1::forward<DB::StorageReplicatedMergeTree::processQueueEntry(std::__1::shared_ptr<DB::ReplicatedMergeTreeQueue::SelectedEntry>))(std::__1::forward<std::__1::shared_ptr<DB::ReplicatedMergeTreeLogEntry>&>(fp0))) std::__1::__invoke<DB::StorageReplicatedMergeTree::processQueueEntry(std::__1::shared_ptr<DB::ReplicatedMergeTreeQueue::SelectedEntry>)::$_18&, std::__1::shared_ptr<DB::ReplicatedMEntry>&>(DB::StorageReplicatedMergeTree::processQueueEntry(std::__1::shared_ptr<DB::ReplicatedMergeTreeQueue::SelectedEntry>)::$_18&, std::__1::shared_ptr<DB::ReplicatedMergeTreeLogEntry>&) @ 0x1f65fa32 in /usr/bin/clickhouse
    02:47:18.979481 [ 29208 ] {} <Fatal> BaseDaemon: 13. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/__functional_base:317: bool std::__1::__invoke_void_return_wrapper<bool>::__call<DB::StorageReplicatedMergeTree::processQueueEntry(std::__1::shared_ptr<DB::ReplireeQueue::SelectedEntry>)::$_18&, std::__1::shared_ptr<DB::ReplicatedMergeTreeLogEntry>&>(DB::StorageReplicatedMergeTree::processQueueEntry(std::__1::shared_ptr<DB::ReplicatedMergeTreeQueue::SelectedEntry>)::$_18&, std::__1::shared_ptr<DB::ReplicatedMergeTreeLogE x1f65f9f2 in /usr/bin/clickhouse
    02:47:19.450807 [ 29209 ] {} <Fatal> BaseDaemon: 13. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/__functional_base:317: bool std::__1::__invoke_void_return_wrapper<bool>::__call<DB::StorageReplicatedMergeTree::processQueueEntry(std::__1::shared_ptr<DB::ReplireeQueue::SelectedEntry>)::$_18&, std::__1::shared_ptr<DB::ReplicatedMergeTreeLogEntry>&>(DB::StorageReplicatedMergeTree::processQueueEntry(std::__1::shared_ptr<DB::ReplicatedMergeTreeQueue::SelectedEntry>)::$_18&, std::__1::shared_ptr<DB::ReplicatedMergeTreeLogE x1f65f9f2 in /usr/bin/clickhouse
    02:47:21.055007 [ 29208 ] {} <Fatal> BaseDaemon: 14. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/functional:1608: std::__1::__function::__default_alloc_func<DB::StorageReplicatedMergeTree::processQueueEntry(std::__1::shared_ptr<DB::ReplicatedMergeTreeQueue::ry>)::$_18, bool (std::__1::shared_ptr<DB::ReplicatedMergeTreeLogEntry>&)>::operator()(std::__1::shared_ptr<DB::ReplicatedMergeTreeLogEntry>&) @ 0x1f65f9b0 in /usr/bin/clickhouse
    02:47:23.546946 [ 413 ] {} <Fatal> Application: Child process was terminated by signal 6.
```

</details>

CI: https://clickhouse-test-reports.s3.yandex.net/0/4a8b82232c11512232df3ecdf4ffaec287116ad5/stress_test_(debug).html#fail1
2021-08-27 10:08:44 +03:00
..
Distributed Rename some files. 2021-07-26 19:48:25 +03:00
examples better 2021-08-25 15:40:56 +00:00
fuzzers better 2021-08-25 15:40:56 +00:00
HDFS Update storages. 2021-07-23 22:33:59 +03:00
Kafka Fix incorrect assertion during writing to StorageKafka 2021-08-19 22:07:20 +03:00
LiveView Fix build. 2021-08-12 16:02:17 +03:00
MergeTree Fix removing of parts in a Temporary state 2021-08-27 10:08:44 +03:00
MySQL Add settings (for connections) for MySQL storage engine 2021-05-20 22:44:52 +03:00
PostgreSQL Init SettingFieldBool with true or false, not with 1 or 0. 2021-08-23 09:47:36 +03:00
RabbitMQ Merge pull request #27921 from vitlibar/add-tests-for-field-init 2021-08-24 17:15:44 +03:00
RocksDB Merge pull request #26821 from azat/rocksdb-improvements 2021-07-27 17:31:12 +03:00
System Merge branch 'master' into create-user-defined-lambda-function 2021-08-23 11:08:49 +03:00
tests Fix unit test 2021-08-08 04:02:48 +03:00
AlterCommands.cpp modify column datatype to Nullable(datatype) or Nullable(datatype) to Nullable(datatype) donot allways need mutations. 2021-08-17 21:14:13 +08:00
AlterCommands.h fix assertions in Replicated database 2021-08-02 16:19:11 +03:00
CheckResults.h
CMakeLists.txt Lower the size of the binaries 2021-08-21 02:20:23 +00:00
ColumnCodec.h
ColumnDefault.cpp
ColumnDefault.h
ColumnDependency.h
ColumnsDescription.cpp Deleted some unneded changes 2021-08-25 15:40:56 +00:00
ColumnsDescription.h better performance of getSampleBlockForColumns 2021-07-15 20:36:48 +03:00
CompressionCodecSelector.h Remove string parameter for Density 2021-05-24 06:43:25 +03:00
ConstraintsDescription.cpp ExpressionActions compile only necessary places 2021-05-19 11:43:16 +03:00
ConstraintsDescription.h
DataDestinationType.h
extractKeyExpressionList.cpp
extractKeyExpressionList.h
getStructureOfRemoteTable.cpp
getStructureOfRemoteTable.h
IndicesDescription.cpp
IndicesDescription.h
IStorage_fwd.h
IStorage.cpp Added new commands BACKUP and RESTORE. 2021-08-23 23:41:45 +03:00
IStorage.h Merge branch 'master' into s3partitionedwrite 2021-08-24 10:03:57 +03:00
JoinSettings.cpp
JoinSettings.h
KeyDescription.cpp Fix comparisons with modulo key (version 2) 2021-05-21 16:40:47 +00:00
KeyDescription.h Fix comparisons with modulo key (version 2) 2021-05-21 16:40:47 +00:00
MarkCache.h
MemorySettings.cpp
MemorySettings.h
MutationCommands.cpp
MutationCommands.h
PartitionCommands.cpp
PartitionCommands.h
ProjectionsDescription.cpp Better exception for invalid projection creation 2021-05-31 12:24:09 +08:00
ProjectionsDescription.h Fix alter table drop projection if exists 2021-05-28 21:27:36 +08:00
ReadFinalForExternalReplicaStorage.cpp Merge branch 'master' into fix_no_column_materialized_mysql 2021-07-05 22:07:56 +03:00
ReadFinalForExternalReplicaStorage.h Merge branch 'master' into fix_no_column_materialized_mysql 2021-07-05 22:07:56 +03:00
ReadInOrderOptimizer.cpp Better code. 2021-08-17 12:32:49 +08:00
ReadInOrderOptimizer.h pushdown limit while reading in order of primary key 2021-07-13 17:24:45 +03:00
registerStorages.cpp Fix build 2021-07-09 15:47:57 +00:00
registerStorages.h
SelectQueryDescription.cpp
SelectQueryDescription.h
SelectQueryInfo.h Improve projection analysis. 2021-08-16 20:11:57 +08:00
SetSettings.cpp
SetSettings.h
StorageBuffer.cpp Update storages. 2021-07-23 22:33:59 +03:00
StorageBuffer.h Update Storage::write 2021-07-23 17:25:35 +03:00
StorageDictionary.cpp Streams -> Processors for dicts, part 3. 2021-08-06 11:41:45 +03:00
StorageDictionary.h Support REPLACE DICTIONARY, CREATE OR REPLACE DICTIONARY queries 2021-06-26 14:28:13 +03:00
StorageDistributed.cpp fix 2021-08-20 17:05:53 +03:00
StorageDistributed.h fix 2021-08-20 17:05:53 +03:00
StorageExternalDistributed.cpp Fix 2021-08-13 20:58:03 +00:00
StorageExternalDistributed.h Merge ext into common 2021-06-16 23:28:41 +03:00
StorageFactory.cpp Fix used_storages by using log_queries from local context 2021-08-04 21:44:19 +03:00
StorageFactory.h Make ContextPtr const by default. 2021-05-31 17:49:02 +03:00
StorageFile.cpp Fix tests 2021-08-22 21:41:09 +03:00
StorageFile.h Merge branch 'master' into output-streams-to-processors 2021-07-26 18:03:11 +03:00
StorageGenerateRandom.cpp
StorageGenerateRandom.h Merge ext into common 2021-06-16 23:28:41 +03:00
StorageInMemoryMetadata.cpp Merge pull request #28028 from ClickHouse/replicated-tree-attach-wip 2021-08-26 13:50:29 +03:00
StorageInMemoryMetadata.h improvement of materilize ttl 2021-07-30 12:27:15 +08:00
StorageInput.cpp Remove some streams. 2021-07-20 21:18:43 +03:00
StorageInput.h Remove some streams. 2021-07-20 21:18:43 +03:00
StorageJoin.cpp Update storages. 2021-07-23 22:33:59 +03:00
StorageJoin.h Update Storage::write 2021-07-23 17:25:35 +03:00
StorageLog.cpp Fix some tests. 2021-07-26 13:08:40 +03:00
StorageLog.h Update storages. 2021-07-23 22:33:59 +03:00
StorageLogSettings.cpp
StorageLogSettings.h
StorageMaterializedMySQL.cpp rename MaterializeMySQL to MaterializedMySQL 2021-07-26 21:17:28 +03:00
StorageMaterializedMySQL.h Merge branch 'master' into rename_materialize_mysql 2021-07-27 22:38:40 +03:00
StorageMaterializedView.cpp Update storages. 2021-07-23 22:33:59 +03:00
StorageMaterializedView.h Update storages. 2021-07-23 22:33:59 +03:00
StorageMemory.cpp Fix some tests. 2021-07-26 13:08:40 +03:00
StorageMemory.h Update storages. 2021-07-23 22:33:59 +03:00
StorageMerge.cpp Use setSetting() with implicit conversion true/false -> Field. 2021-08-23 08:57:00 +03:00
StorageMerge.h fix 2021-07-02 02:50:55 +00:00
StorageMergeTree.cpp Added new commands BACKUP and RESTORE. 2021-08-23 23:41:45 +03:00
StorageMergeTree.h Added new commands BACKUP and RESTORE. 2021-08-23 23:41:45 +03:00
StorageMongoDB.cpp Removed some data streams 2021-08-11 23:39:01 +03:00
StorageMongoDB.h MongoDB SSL Connection 2021-07-28 09:38:34 +00:00
StorageMongoDBSocketFactory.cpp Refactor 2021-08-02 15:16:39 +00:00
StorageMongoDBSocketFactory.h Fixes 2021-07-29 08:38:39 +00:00
StorageMySQL.cpp Add test and settings 2021-08-23 22:18:04 +00:00
StorageMySQL.h Update storages. 2021-07-23 22:33:59 +03:00
StorageNull.cpp
StorageNull.h Update storages. 2021-07-23 22:33:59 +03:00
StoragePostgreSQL.cpp Fix build 2021-08-25 21:51:43 +00:00
StoragePostgreSQL.h Postgres ON CONFLICT 2021-08-24 12:37:32 +00:00
StorageProxy.h Use processors in Storage::watch 2021-08-11 20:28:54 +03:00
StorageReplicatedMergeTree.cpp Merge pull request #28035 from ClickHouse/fix_replace_ranges_may_stuck 2021-08-24 17:49:57 +03:00
StorageReplicatedMergeTree.h Merge branch 'master' into nv/last-queue-update-exception 2021-08-18 07:00:50 +00:00
StorageS3.cpp Fix validateKey/Bucket for S3 2021-08-23 09:22:15 +03:00
StorageS3.h Review fixes. 2021-08-23 09:22:13 +03:00
StorageS3Cluster.cpp Merge pull request #26731 from vdimir/fix-async-drain-connection-uaf 2021-07-24 18:55:03 +03:00
StorageS3Cluster.h Fix use after free in AsyncDrain connection from S3Cluster 2021-07-23 10:40:03 +03:00
StorageS3Settings.cpp
StorageS3Settings.h
StorageSet.cpp Try fix test_mutations_with_merge_background_task 2021-08-18 13:30:02 +03:00
StorageSet.h Update Storage::write 2021-07-23 17:25:35 +03:00
StorageSQLite.cpp Removed some data streams 2021-08-11 23:39:01 +03:00
StorageSQLite.h Merge branch 'master' into output-streams-to-processors 2021-07-27 11:31:53 +03:00
StorageStripeLog.cpp Fix some tests. 2021-07-26 13:08:40 +03:00
StorageStripeLog.h Update Storage::write 2021-07-23 17:25:35 +03:00
StorageTableFunction.h Update Storage::write 2021-07-23 17:25:35 +03:00
StorageTinyLog.cpp Fix some tests. 2021-07-26 13:08:40 +03:00
StorageTinyLog.h Update Storage::write 2021-07-23 17:25:35 +03:00
StorageURL.cpp Merge branch 'master' into output-streams-to-processors 2021-07-26 18:03:11 +03:00
StorageURL.h Update storages. 2021-07-23 22:33:59 +03:00
StorageValues.cpp
StorageValues.h Merge ext into common 2021-06-16 23:28:41 +03:00
StorageView.cpp Fix hasJoin in StorageView.cpp 2021-08-06 13:48:47 +03:00
StorageView.h Use settings from global context in StorageView 2021-06-22 17:39:09 +03:00
StorageXDBC.cpp Update Storage::write 2021-07-23 17:25:35 +03:00
StorageXDBC.h Update Storage::write 2021-07-23 17:25:35 +03:00
TableLockHolder.h
transformQueryForExternalDatabase.cpp Fix unit-tests again 2021-06-07 16:52:47 +03:00
transformQueryForExternalDatabase.h
TTLDescription.cpp
TTLDescription.h
TTLMode.h
VirtualColumnUtils.cpp Update VirtualColumnUtils.cpp 2021-06-28 16:47:47 +03:00
VirtualColumnUtils.h
ya.make Merge pull request #27191 from FArthur-cmd/memory-tracker-26043 2021-08-10 14:01:02 +03:00
ya.make.in