mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-19 16:20:50 +00:00
Minor fixes
This commit is contained in:
parent
edf4e09fb2
commit
b2c4b771d8
@ -278,9 +278,10 @@ MergeTreePartsMover::TemporaryClonedPart MergeTreePartsMover::clonePart(const Me
|
|||||||
cloned_part.part = std::move(builder).withPartFormatFromDisk().build();
|
cloned_part.part = std::move(builder).withPartFormatFromDisk().build();
|
||||||
LOG_TRACE(log, "Part {} was cloned to {}", part->name, cloned_part.part->getDataPartStorage().getFullPath());
|
LOG_TRACE(log, "Part {} was cloned to {}", part->name, cloned_part.part->getDataPartStorage().getFullPath());
|
||||||
|
|
||||||
|
cloned_part.part->is_temp = false;
|
||||||
if (data->allowRemoveStaleMovingParts())
|
if (data->allowRemoveStaleMovingParts())
|
||||||
{
|
{
|
||||||
cloned_part.part->is_temp = data->allowRemoveStaleMovingParts();
|
cloned_part.part->is_temp = true;
|
||||||
/// Setting it in case connection to zookeeper is lost while moving
|
/// Setting it in case connection to zookeeper is lost while moving
|
||||||
/// Otherwise part might be stuck in the moving directory due to the KEEPER_EXCEPTION in part's destructor
|
/// Otherwise part might be stuck in the moving directory due to the KEEPER_EXCEPTION in part's destructor
|
||||||
cloned_part.part->remove_tmp_policy = IMergeTreeDataPart::BlobsRemovalPolicyForTemporaryParts::REMOVE_BLOBS;
|
cloned_part.part->remove_tmp_policy = IMergeTreeDataPart::BlobsRemovalPolicyForTemporaryParts::REMOVE_BLOBS;
|
||||||
|
@ -53,15 +53,6 @@ def exec(node, cmd, path):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def stop_zookeeper(node):
|
|
||||||
node.exec_in_container(["bash", "-c", "/opt/zookeeper/bin/zkServer.sh stop"])
|
|
||||||
timeout = time.time() + 60
|
|
||||||
while node.get_process_pid("zookeeper") != None:
|
|
||||||
if time.time() > timeout:
|
|
||||||
raise Exception("Failed to stop ZooKeeper in 60 secs")
|
|
||||||
time.sleep(0.2)
|
|
||||||
|
|
||||||
|
|
||||||
def wait_part_is_stuck(node, table_moving_path, moving_part):
|
def wait_part_is_stuck(node, table_moving_path, moving_part):
|
||||||
num_tries = 5
|
num_tries = 5
|
||||||
while q(node, "SELECT part_name FROM system.moves").strip() != moving_part:
|
while q(node, "SELECT part_name FROM system.moves").strip() != moving_part:
|
||||||
|
Loading…
Reference in New Issue
Block a user