Netflix / vizceral-example

Example Vizceral app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Number of service versus number filtered is incorrect

aSqrd-eSqrd opened this issue · comments

It took another day to compare the behavior between version 3.x.x and 4.x.x to make sure it was actually behaving correctly in ver 3.x (it was) and not just something I'd never noticed till running into issue #17. This issue becomes very clear when following the steps to re-produce issue #17. Particularly, it played a big roll in why I had the impression that the entire browser is hung, since the graph is "frozen" and the number of filtered items is zero.

After quite a bit of careful examination I found that...
Under ver 3, when the RPS filter was changed or reset the filter change occurred first (i.e. vizceral _relayout was executed), followed by what I at this point can only assume was the render causing the Locator component to re-render which allowed it to pick up the correct numbers from the nodeCounts out of the state. However, I could find nothing particularly enforcing this order of events in response to filter changes, but for whatever reason it seems to be very deterministic in this _relayout, re-render sequence regardless of restarting the dev-server or even closing all browser instances then opening up a clean browser, etc.

Under ver 4, the order is to re-render the Locator component before passing through _relayout. I'm not all that comfortable with React, but I tried a few things to see if I could simply cause the re-render to delay till the filters had been applied.

I wish I could be more helpful or could have at least found a definitive difference between the last ver 3 and the current newest ver 4 to cause the difference but there just doesn't appear to be one.

Just follow the steps for re-producing issue #17 but being sure to watch the "# service / # filtered" info by the search window.