Skip to content

Fix: Wrong edge path number in evaluation after variation deletion#3

Closed
SachinDarade wants to merge 1 commit intoPhonePe:mainfrom
SachinDarade:feature/edge-path-number-fix
Closed

Fix: Wrong edge path number in evaluation after variation deletion#3
SachinDarade wants to merge 1 commit intoPhonePe:mainfrom
SachinDarade:feature/edge-path-number-fix

Conversation

@SachinDarade
Copy link

Consider the scneario with 4 edges like below:
image

Issue
Response of evaluation contains edgePath which stores the path in which the edges were successfully chosen.
Now suppose the edge with filter userId = U3 gets deleted. Here the number of edge with filter userId = 4 still remains 4.
However, this edgeNumber is used in edgePath tracing during evaluation of a key. So what happens is that now suppose context map was userId = 4 then the correct edge with filter userId = 4 gets evaluated however the edgePath response is [4] instead of [3] (which is the current position of the edge of U4 in the list of edges of rootKnot

Fix
Instead of getting the edge position from edge's number, we instead calculate the position of edge in list of edgeIdentifiers of a knot by iterating the list and finding the position.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant