mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
Merge pull request #36138 from ClickHouse/tavplubix-patch-4
Minor improvement for hung check
This commit is contained in:
commit
c14c9329bb
@ -131,7 +131,7 @@ def prepare_for_hung_check(drop_databases):
|
||||
Popen(command, shell=True)
|
||||
break
|
||||
except Exception as ex:
|
||||
print("Failed to SHOW or DROP databasese, will retry", ex)
|
||||
logging.error("Failed to SHOW or DROP databasese, will retry %s", str(ex))
|
||||
time.sleep(i)
|
||||
else:
|
||||
raise Exception("Cannot drop databases after stress tests. Probably server consumed too much memory and cannot execute simple queries")
|
||||
@ -198,7 +198,11 @@ if __name__ == "__main__":
|
||||
logging.info("Logs compressed")
|
||||
|
||||
if args.hung_check:
|
||||
have_long_running_queries = prepare_for_hung_check(args.drop_databases)
|
||||
try:
|
||||
have_long_running_queries = prepare_for_hung_check(args.drop_databases)
|
||||
except Exception as ex:
|
||||
have_long_running_queries = True
|
||||
logging.error("Failed to prepare for hung check %s", str(ex))
|
||||
logging.info("Checking if some queries hung")
|
||||
cmd = ' '.join([args.test_cmd,
|
||||
# Do not track memory allocations up to 1Gi,
|
||||
@ -215,6 +219,8 @@ if __name__ == "__main__":
|
||||
"--client-option", "max_untracked_memory=1Gi",
|
||||
"--client-option", "max_memory_usage_for_user=0",
|
||||
"--client-option", "memory_profiler_step=1Gi",
|
||||
# Use system database to avoid CREATE/DROP DATABASE queries
|
||||
"--database=system",
|
||||
"--hung-check",
|
||||
"00001_select_1"
|
||||
])
|
||||
|
@ -1173,6 +1173,9 @@ def check_server_started(args):
|
||||
retry_count -= 1
|
||||
sleep(0.5)
|
||||
continue
|
||||
except TimeoutError:
|
||||
print("\nConnection timeout, will not retry")
|
||||
break
|
||||
|
||||
print('\nAll connection tries failed')
|
||||
sys.stdout.flush()
|
||||
|
Loading…
Reference in New Issue
Block a user