mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-21 17:20:50 +00:00
Review fixes
This commit is contained in:
parent
9941fbe32d
commit
ce73b30505
@ -141,16 +141,6 @@ void StorageMergeTree::shutdown()
|
|||||||
mutation_wait_event.notify_all();
|
mutation_wait_event.notify_all();
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
clearOldPartsFromFilesystem(true);
|
|
||||||
}
|
|
||||||
catch (...)
|
|
||||||
{
|
|
||||||
/// Example: the case of readonly filesystem, we have failure removing old parts.
|
|
||||||
/// Should not prevent table shutdown.
|
|
||||||
tryLogCurrentException(log);
|
|
||||||
}
|
|
||||||
|
|
||||||
merger_mutator.merges_blocker.cancelForever();
|
merger_mutator.merges_blocker.cancelForever();
|
||||||
parts_mover.moves_blocker.cancelForever();
|
parts_mover.moves_blocker.cancelForever();
|
||||||
@ -160,6 +150,23 @@ void StorageMergeTree::shutdown()
|
|||||||
|
|
||||||
if (moving_task_handle)
|
if (moving_task_handle)
|
||||||
global_context.getBackgroundMovePool().removeTask(moving_task_handle);
|
global_context.getBackgroundMovePool().removeTask(moving_task_handle);
|
||||||
|
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
/// We clear all old parts after stopping all background operations.
|
||||||
|
/// It's important, because background operations can produce temporary
|
||||||
|
/// parts which will remove themselves in their descrutors. If so, we
|
||||||
|
/// may have race condition between our remove call and background
|
||||||
|
/// process.
|
||||||
|
clearOldPartsFromFilesystem(true);
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
/// Example: the case of readonly filesystem, we have failure removing old parts.
|
||||||
|
/// Should not prevent table shutdown.
|
||||||
|
tryLogCurrentException(log);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2997,10 +2997,10 @@ void StorageReplicatedMergeTree::shutdown()
|
|||||||
}
|
}
|
||||||
data_parts_exchange_endpoint.reset();
|
data_parts_exchange_endpoint.reset();
|
||||||
|
|
||||||
/// We clear all parts after stopping all background operations. It's
|
/// We clear all old parts after stopping all background operations. It's
|
||||||
/// important, because background operations can produce temporary parts
|
/// important, because background operations can produce temporary parts
|
||||||
/// which will remove themselfs in their descrutors. If so, we may have race
|
/// which will remove themselves in their descrutors. If so, we may have
|
||||||
/// condition between our remove call and background process.
|
/// race condition between our remove call and background process.
|
||||||
clearOldPartsFromFilesystem(true);
|
clearOldPartsFromFilesystem(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ echo "Finishing alters"
|
|||||||
|
|
||||||
# This alter will finish all previous, but replica 1 maybe still not up-to-date.
|
# This alter will finish all previous, but replica 1 maybe still not up-to-date.
|
||||||
# If query will throw something, than we will sleep 1 and retry. If timeout
|
# If query will throw something, than we will sleep 1 and retry. If timeout
|
||||||
# happened we will silentrly go out of loop and probably fail tests in the
|
# happened we will silently go out of loop and probably fail tests in the
|
||||||
# following for loop.
|
# following for loop.
|
||||||
#
|
#
|
||||||
# 120 seconds is more than enough, but in rare cases for slow builds (debug,
|
# 120 seconds is more than enough, but in rare cases for slow builds (debug,
|
||||||
|
Loading…
Reference in New Issue
Block a user