You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Locking files when writing to avoid concurrency issues #137
I have done some thinking and I think there is only a way to achieve this and still being working async. In other words, reads are fine to be async as they are, but for writes, the server has to have a global state of what file is being written at the moment which has some sort of queuing (or even simpler nextTick) until the resource is free.
By bringing back sync, a possible attack could be loading a 10 GB file while two people are chatting (hence breaking their conversation)
Activity
nicola commentedon Dec 21, 2015
I have done some thinking and I think there is only a way to achieve this and still being working async. In other words, reads are fine to be async as they are, but for writes, the server has to have a global state of what file is being written at the moment which has some sort of queuing (or even simpler nextTick) until the resource is free.
By bringing back sync, a possible attack could be loading a 10 GB file while two people are chatting (hence breaking their conversation)
RubenVerborgh commentedon Jul 19, 2018
Not a problem right now, can reconsider in the future.
RubenVerborgh commentedon Feb 14, 2019
Reopening, as the future is now.
RubenVerborgh commentedon Sep 7, 2020
Fixed in #1116