简体   繁体   中英

Locking record in Riak database (NoSql)

Is this possible to lock the record in Riak database ?

Like, in oracle- if we are updating the record in oracle table row, We have an option to lock the record while updating.

Is it possible to lock the record in riak database while updating record/object.

Locking is not supported in Riak. Instead, if two writers try to update the same value at the same time, both writes are kept as sibling values. Your application can then select the "correct" value.

If you would prefer to just keep the most recently written value and discard the other, explicitly set allow_mult to false on the bucket and Riak will automatically pick the newest time stamp when sibling values are encountered.

However, I don't think this setting works with strong consistency or data types.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM