richfitz / storr

:package: Object cacher for R
http://richfitz.github.io/storr
Other
117 stars 10 forks source link

Question: simultaneous writes to non-RDS storrs #91

Open wlandau opened 6 years ago

wlandau commented 6 years ago

Just wondering: at some point, do you plan to ensure the thread safety of alternative drivers? It would be nice to have a DBI driver with protections against race conditions.

richfitz commented 5 years ago

I think it depends what you mean about race conditions. From the point of view of corruption

wlandau commented 5 years ago

I am concerned specifically about situations in which different processes, either on the same host or different remote nodes, try to write different targets to the same cache at the same time. The tips about redis and thor are helpful. (Is thor safe when the processes are on different nodes?) I have had trouble with DBI/SQLite storrs when caching is set to "worker" here.

I think my SQLite installation just is not up to par. I had similar issues with liteq (which claims to be thread safe) which is the reason why I wrote txtq.