Don't overwrite dashboard each time a dashboard is loaded
An UPDATE_DASHBOARD action is being created via a putDashboard call each time a dashboard is loaded, which overwrites a dashboard with itself.
@jaredscheib are there negative side effects of this, or is it just a bit sloppy?
@nhaugo It has two negative side effects:
- it writes the entire dashboard, which could be an increasingly large amount of data, every time you load that dashboard
- 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?
Doesn't this get fixed with multitenancy
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 this was closed because:
- There was no response when asked for clarification 5 months ago
- This is not an issue
Happy to reopen if it becomes one