mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Review fixes
This commit is contained in:
parent
c3d0b35195
commit
223f45685f
@ -141,16 +141,6 @@ void StorageMergeTree::shutdown()
|
||||
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();
|
||||
parts_mover.moves_blocker.cancelForever();
|
||||
@ -160,6 +150,23 @@ void StorageMergeTree::shutdown()
|
||||
|
||||
if (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();
|
||||
|
||||
/// 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
|
||||
/// which will remove themselfs in their descrutors. If so, we may have race
|
||||
/// condition between our remove call and background process.
|
||||
/// which will remove themselves in their descrutors. If so, we may have
|
||||
/// race condition between our remove call and background process.
|
||||
clearOldPartsFromFilesystem(true);
|
||||
}
|
||||
|
||||
|
@ -102,7 +102,7 @@ echo "Finishing alters"
|
||||
|
||||
# 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
|
||||
# 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.
|
||||
#
|
||||
# 120 seconds is more than enough, but in rare cases for slow builds (debug,
|
||||
|
Loading…
Reference in New Issue
Block a user