Fix Visual Explain view crashing on multi-parents nodes#489
Fix Visual Explain view crashing on multi-parents nodes#489sebjulliand wants to merge 6 commits intomainfrom
Conversation
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
|
👋 A new build is available for this PR based on f23d4cd. |
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
|
@sebjulliand |
|
@SanjulaGanepola I ran a slightly modified query (I couldn't run the original one on the LPARs I had). WITH ip_addrs(rmt_addr, rmt_count)
AS (SELECT remote_address, COUNT(*)
FROM QSYS2.netstat_info AS x
GROUP BY remote_address)
SELECT i.rmt_addr, i.rmt_count, user_name, rmt_port
FROM ip_addrs i LEFT OUTER JOIN
qsys2.netstat_job_info n ON i.rmt_addr = remote_address
union all
SELECT i.rmt_addr, i.rmt_count, user_name, rmt_port
FROM ip_addrs i LEFT OUTER JOIN
qsys2.netstat_job_info n ON i.rmt_addr = remote_address
union all
SELECT i.rmt_addr, i.rmt_count, user_name, rmt_port
FROM ip_addrs i LEFT OUTER JOIN
qsys2.netstat_job_info n ON i.rmt_addr = remote_address |
|
@SanjulaGanepola as far as I could tell, while working on this fix, the VE data structure is comprised on many rows returned by a request. Each row is a line of information for a node. So the code loops over each row to recompose each node (each row has a node id). |
|
@sebjulliand I just gave every case a try again: Main branch with the original query:
Main branch with the #489 (comment) query:
This branch with the original query:
This branch with the #489 (comment) query:
|
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
|
@SanjulaGanepola I guess that bug existed since...forever. I pushed a fix and so far, the results seem OK. I added a check to prevent the process from crashing in case an attribute is not found while processing delta. I also compared the values being replaced during delta processing and they were either unknown or the same as the value replacing them. I'll let you have a look and validate it 😁 |




Description
Fixes #423
This PR fixes an issue making the Visual Explain treeview crash as described in #423.
The logic used to link nodes with each others was flawed as it did not use the
child nodeinformation returned by Visual Explain. This could work as long as each node had one and only one parent. But if one or more nodes have multiple parents, it would crash.With this PR, nodes are linked together using the children node ids returned by Visual Explain.
How to test
Run
Explain(without running is fine) using a query producing a graph with nodes having multiple parents, like the one provided in #423:Before the PR, the VE view would show the

this.flatNodes[node.id] is not iterableerror.With the PR applied, the graph must be displayed correctly.