mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 16:42:05 +00:00
ignore session expired errors after BC check
This commit is contained in:
parent
f4bc44f729
commit
469406c494
@ -497,6 +497,7 @@ else
|
|||||||
-e "Coordination::Exception: Connection loss" \
|
-e "Coordination::Exception: Connection loss" \
|
||||||
-e "MutateFromLogEntryTask" \
|
-e "MutateFromLogEntryTask" \
|
||||||
-e "No connection to ZooKeeper, cannot get shared table ID" \
|
-e "No connection to ZooKeeper, cannot get shared table ID" \
|
||||||
|
-e "Session expired" \
|
||||||
/var/log/clickhouse-server/clickhouse-server.backward.clean.log | zgrep -Fa "<Error>" > /test_output/bc_check_error_messages.txt \
|
/var/log/clickhouse-server/clickhouse-server.backward.clean.log | zgrep -Fa "<Error>" > /test_output/bc_check_error_messages.txt \
|
||||||
&& echo -e 'Backward compatibility check: Error message in clickhouse-server.log (see bc_check_error_messages.txt)\tFAIL' >> /test_output/test_results.tsv \
|
&& echo -e 'Backward compatibility check: Error message in clickhouse-server.log (see bc_check_error_messages.txt)\tFAIL' >> /test_output/test_results.tsv \
|
||||||
|| echo -e 'Backward compatibility check: No Error messages in clickhouse-server.log\tOK' >> /test_output/test_results.tsv
|
|| echo -e 'Backward compatibility check: No Error messages in clickhouse-server.log\tOK' >> /test_output/test_results.tsv
|
||||||
|
@ -357,25 +357,37 @@ StorageReplicatedMergeTree::StorageReplicatedMergeTree(
|
|||||||
/// It does not make sense for CREATE query
|
/// It does not make sense for CREATE query
|
||||||
if (attach)
|
if (attach)
|
||||||
{
|
{
|
||||||
if (current_zookeeper && current_zookeeper->exists(replica_path + "/host"))
|
try
|
||||||
{
|
{
|
||||||
/// Check it earlier if we can (we don't want incompatible version to start).
|
if (current_zookeeper && current_zookeeper->exists(replica_path + "/host"))
|
||||||
/// If "/host" doesn't exist, then replica is probably dropped and there's nothing to check.
|
{
|
||||||
ReplicatedMergeTreeAttachThread::checkHasReplicaMetadataInZooKeeper(current_zookeeper, replica_path);
|
/// Check it earlier if we can (we don't want incompatible version to start).
|
||||||
|
/// If "/host" doesn't exist, then replica is probably dropped and there's nothing to check.
|
||||||
|
ReplicatedMergeTreeAttachThread::checkHasReplicaMetadataInZooKeeper(current_zookeeper, replica_path);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (current_zookeeper && current_zookeeper->exists(replica_path + "/flags/force_restore_data"))
|
||||||
|
{
|
||||||
|
skip_sanity_checks = true;
|
||||||
|
current_zookeeper->remove(replica_path + "/flags/force_restore_data");
|
||||||
|
|
||||||
|
LOG_WARNING(
|
||||||
|
log,
|
||||||
|
"Skipping the limits on severity of changes to data parts and columns (flag {}/flags/force_restore_data).",
|
||||||
|
replica_path);
|
||||||
|
}
|
||||||
|
else if (has_force_restore_data_flag)
|
||||||
|
{
|
||||||
|
skip_sanity_checks = true;
|
||||||
|
|
||||||
|
LOG_WARNING(log, "Skipping the limits on severity of changes to data parts and columns (flag force_restore_data).");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
catch (const Coordination::Exception & e)
|
||||||
if (current_zookeeper && current_zookeeper->exists(replica_path + "/flags/force_restore_data"))
|
|
||||||
{
|
{
|
||||||
skip_sanity_checks = true;
|
if (!Coordination::isHardwareError(e.code))
|
||||||
current_zookeeper->remove(replica_path + "/flags/force_restore_data");
|
throw;
|
||||||
|
LOG_ERROR(log, "Caught exception while checking table metadata in ZooKeeper, will recheck later: {}", e.displayText());
|
||||||
LOG_WARNING(log, "Skipping the limits on severity of changes to data parts and columns (flag {}/flags/force_restore_data).", replica_path);
|
|
||||||
}
|
|
||||||
else if (has_force_restore_data_flag)
|
|
||||||
{
|
|
||||||
skip_sanity_checks = true;
|
|
||||||
|
|
||||||
LOG_WARNING(log, "Skipping the limits on severity of changes to data parts and columns (flag force_restore_data).");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user