timestored / pulseui

Real-time interactive database applications
https://www.timestored.com/pulse/
Other
54 stars 6 forks source link

Server restart causes save to fail #216

Open ryanhamilton opened 7 months ago

ryanhamilton commented 7 months ago

user-ml reported losing saved dashboards.

"Mehdi has noticed that Pulse doesn’t save properly and has lost his changes"

I tested a few scenarios and the following sequence would cause problems:

  1. User A opens dashboard D
  2. User A saves dashboard D
  3. Server restarts
  4. user A clicks reconnect
  5. user A clicks save (red popup says it failed). The failure only occurs when the server restarts and does notify the user with a red popup. This failure was due to optimistic caching to make dashboards load faster. We hadn't properly considered the multiple writes scenario.

Integration tests couldn't catch it as the cahing is within the browser.