Skip to content

Commit

Permalink
fixbug:set relate error
Browse files Browse the repository at this point in the history
**Phenomenon and reproduction steps**

**Root cause and solution**

**Impactions**

**Test method**

**Affected branch(es)**

* main

**Checklist**

- [ ] Dependencies update required
- [ ] Common bug (similar problem in other repo)
  • Loading branch information
LYootsz authored and SongZhen0704 committed Sep 22, 2022
1 parent 6e07175 commit 8cc05d1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/app/application/l7_flow_tracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,9 +325,8 @@ async def trace_l7_flow(self,
if new_app_metas:
for app in apps:
app.set_relate(new_flows)
new_flows.drop(
new_flows.loc[new_flows['related_ids'] == ''].index,
inplace=True)
new_flows.drop(new_flows.loc[new_flows['related_ids'] == ''].index,
inplace=True)
dataframe_flowmetas = pd.concat([dataframe_flowmetas, new_flows],
join="outer",
ignore_index=True)
Expand Down Expand Up @@ -1113,10 +1112,11 @@ def sort_all_flows(dataframe_flows: DataFrame, network_delay_us: int,
related_ids = []
for related_id in flow["related_ids"]:
related_id = related_id.split("-")
if related_id[0] in related_ids["_id"]:
if related_id[0] in flow["_id"]:
continue
if id_map.get(related_id[0]):
related_ids.append(f"{id_map[related_id[0]]}-{related_id[1]}-{related_id[0]}")
related_ids.append(
f"{id_map[related_id[0]]}-{related_id[1]}-{related_id[0]}")
flow["related_ids"] = related_ids

# 从Flow中提取Service:一个<vtap_id, local_process_id>二元组认为是一个Service。
Expand Down

0 comments on commit 8cc05d1

Please sign in to comment.