asdine / storm

Simple and powerful toolkit for BoltDB
MIT License
2.06k stars 139 forks source link

Lock particular key or range of keys #277

Open vdimir opened 4 years ago

vdimir commented 4 years ago

Is it right to say that storm hasn't any mechanism to lock particular key or range of keys to read and modify it atomically and one option is to perform transaction, that locks whole db (or at least bucket)?

Can you provide some workarounds to solve such problem? One of the solutions that I figure out is to lock keys in user code manually and check it before accessing to the data in db.

Does it make sense to implement such mechanism in storm?