File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -282,6 +282,12 @@ async def query_and_trace_flowmetas(
282282 if trace_id :
283283 allowed_trace_ids .add (trace_id )
284284 new_trace_ids_in_prev_iteration .add (trace_id )
285+
286+ # max_iterations set to 0 means only query data with trace_id
287+ only_query_trace_id = False
288+ if max_iteration == 0 :
289+ max_iteration = 1
290+ only_query_trace_id = True
285291
286292 # 进行迭代查询,上限为 config.spec.max_iteration
287293 for i in range (max_iteration ):
@@ -358,6 +364,8 @@ async def query_and_trace_flowmetas(
358364
359365 if only_query_app_spans : # no more iterations needed
360366 break
367+ if only_query_trace_id : # no more iterations needed
368+ break
361369
362370 # 2. Query by tcp_seq / syscall_trace_id / x_request_id
363371 new_filters = []
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ class FlowLogL7Tracing(Model):
2121 debug = BooleanType (serialized_name = "DEBUG" , required = False )
2222 max_iteration = IntType (serialized_name = "MAX_ITERATION" ,
2323 required = False ,
24- min_value = 1 ,
24+ min_value = 0 ,
2525 default = config .max_iteration )
2626 network_delay_us = IntType (serialized_name = "NETWORK_DELAY_US" ,
2727 required = False ,
You can’t perform that action at this time.
0 commit comments