File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,8 @@ def _try_extract_error_message(stderr: str) -> str:
82
82
if wait_error is not None :
83
83
return YdbCliHelper .WorkloadRunResult (error_message = f'Ydb cluster is dead: { wait_error } ' )
84
84
85
+ cluster_start_time = YdbCluster .get_cluster_info ().get ('max_start_time' , 0 )
86
+
85
87
json_path = yatest .common .work_path (f'q{ query_num } .json' )
86
88
qout_path = yatest .common .work_path (f'q{ query_num } .out' )
87
89
plan_path = yatest .common .work_path (f'q{ query_num } .plan' )
@@ -111,6 +113,8 @@ def _try_extract_error_message(stderr: str) -> str:
111
113
err = f'Invalid return code: { exec .returncode } instesd 0.'
112
114
except (yatest .common .process .TimeoutError , yatest .common .process .ExecutionTimeoutError ):
113
115
err = f'Timeout { timeout } s expeared.'
116
+ if YdbCluster .get_cluster_info ().get ('max_start_time' , 0 ) != cluster_start_time :
117
+ err = ('' if err is None else f'{ err } \n \n ' ) + 'Some nodes were restart'
114
118
stats = {}
115
119
if (os .path .exists (json_path )):
116
120
with open (json_path , 'r' ) as r :
Original file line number Diff line number Diff line change @@ -52,9 +52,11 @@ def get_cluster_info(cls):
52
52
version = ''
53
53
cluster_name = ''
54
54
nodes_wilcard = ''
55
+ max_start_time = 0
55
56
nodes , node_count = cls ._get_cluster_nodes ()
56
57
for node in nodes :
57
58
n = node .get ('SystemState' , {})
59
+ max_start_time = max (max_start_time , int (n .get ('StartTime' , 0 )))
58
60
cluster_name = n .get ('ClusterName' , cluster_name )
59
61
version = n .get ('Version' , version )
60
62
for tenant in n .get ('Tenants' , []):
@@ -67,6 +69,7 @@ def get_cluster_info(cls):
67
69
'name' : cluster_name ,
68
70
'nodes_wilcard' : nodes_wilcard ,
69
71
'service_url' : cls ._get_service_url (),
72
+ 'max_start_time' : max_start_time ,
70
73
}
71
74
return deepcopy (cls ._cluster_info )
72
75
You can’t perform that action at this time.
0 commit comments