mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Merge pull request #41856 from ClickHouse/fix_possible_no_such_key
Remove two redundant lines
This commit is contained in:
commit
1d9e126f94
@ -1408,31 +1408,23 @@ MergeTreeData::DataPartsVector StorageReplicatedMergeTree::checkPartChecksumsAnd
|
||||
ops = std::move(new_ops);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
Coordination::Responses responses;
|
||||
Coordination::Error e = zookeeper->tryMulti(ops, responses);
|
||||
if (e == Coordination::Error::ZOK)
|
||||
return transaction.commit();
|
||||
Coordination::Responses responses;
|
||||
Coordination::Error e = zookeeper->tryMulti(ops, responses);
|
||||
if (e == Coordination::Error::ZOK)
|
||||
return transaction.commit();
|
||||
|
||||
if (e == Coordination::Error::ZNODEEXISTS)
|
||||
if (e == Coordination::Error::ZNODEEXISTS)
|
||||
{
|
||||
size_t num_check_ops = 2 * absent_part_paths_on_replicas.size();
|
||||
size_t failed_op_index = zkutil::getFailedOpIndex(e, responses);
|
||||
if (failed_op_index < num_check_ops)
|
||||
{
|
||||
size_t num_check_ops = 2 * absent_part_paths_on_replicas.size();
|
||||
size_t failed_op_index = zkutil::getFailedOpIndex(e, responses);
|
||||
if (failed_op_index < num_check_ops)
|
||||
{
|
||||
LOG_INFO(log, "The part {} on a replica suddenly appeared, will recheck checksums", ops[failed_op_index]->getPath());
|
||||
continue;
|
||||
}
|
||||
LOG_INFO(log, "The part {} on a replica suddenly appeared, will recheck checksums", ops[failed_op_index]->getPath());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
throw zkutil::KeeperException(e);
|
||||
}
|
||||
catch (const std::exception &)
|
||||
{
|
||||
unlockSharedData(*part);
|
||||
throw;
|
||||
}
|
||||
throw zkutil::KeeperException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@ -8153,7 +8145,6 @@ bool StorageReplicatedMergeTree::createEmptyPartInsteadOfLost(zkutil::ZooKeeperP
|
||||
}
|
||||
catch (const Exception & ex)
|
||||
{
|
||||
unlockSharedData(*new_data_part);
|
||||
LOG_WARNING(log, "Cannot commit empty part {} with error {}", lost_part_name, ex.displayText());
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user