-
Notifications
You must be signed in to change notification settings - Fork 973
potential race condition on session state save #3543
Comments
And indeed I have $ ls -l session-store-* The -dev and .new are my own doing, but the tmp ones are probably due to this bug. |
Could be dataloss, marking 1.0. |
Some tmp files could also be if the browser process crashes during a save. |
yea, that's a possibility, but the window is so small that it seems unlikely to happen twice. Either way I'm pretty sure there is a race in some cases |
we can't really change this to sync either so I think we need to set a value when it's possible to save again and if it's not set then don't save. |
well, I was thinking of an async task queue to serialize the calls to |
Testing steps:
|
saving the state can be triggered by a periodic timer, the user quitting the app or the app quit timeout firing. The actual saving of the state to disk uses async io so the event loop is free to handle other method calls once it starts. This means that another call to save the state could come in and start to save while the previous call is still writing/renaming.
The text was updated successfully, but these errors were encountered: