chronograf icon indicating copy to clipboard operation
chronograf copied to clipboard

Don't overwrite dashboard each time a dashboard is loaded

Open jaredscheib opened this issue 9 years ago • 5 comments

An UPDATE_DASHBOARD action is being created via a putDashboard call each time a dashboard is loaded, which overwrites a dashboard with itself.

jaredscheib avatar Mar 17 '17 00:03 jaredscheib

@jaredscheib are there negative side effects of this, or is it just a bit sloppy?

nhaugo avatar Mar 27 '17 21:03 nhaugo

@nhaugo It has two negative side effects:

  1. it writes the entire dashboard, which could be an increasingly large amount of data, every time you load that dashboard
  2. in a hypothetical future where we want to more nicely handle concurrency in a multitenancy world, the entire dashboard will be overwritten any time any user loads; and, for the upcoming Viewer, this will actually not even work, so the client will either present an error in the console or via notification (I'd have to take a look to know which) every time a Viewer loads the dashboard

@121watts Why was this closed?

jaredscheib avatar Aug 30 '17 18:08 jaredscheib

Doesn't this get fixed with multitenancy

nhaugo avatar Aug 31 '17 01:08 nhaugo

Not sure I understand what you mean 😕

My current hypothesis of what will happen in the multitenancy world, if this is left as-is, is above. Though, if by "fixed with multitenancy" what you mean is, "will this work become necessary to solve anyway once we implement the current vision for multitenancy?", then I believe the answer is yes. We will need to do this work to 1) avoid the above error cases, and 2) prevent race conditions and possible unexpected overwrites due to concurrency of one user loading a dashboard (which currently generates a PUT to save that dashboard) and another user who is saving a specific part of a dashboard (such as a cell).

jaredscheib avatar Aug 31 '17 01:08 jaredscheib

@jaredscheib this was closed because:

  1. There was no response when asked for clarification 5 months ago
  2. This is not an issue

Happy to reopen if it becomes one

121watts avatar Aug 31 '17 05:08 121watts