Closed jfedyczak closed 6 years ago
Yep! Pass options as an optional second parameter to doTransaction
db.doTn(async () => {...}, {retry_limit: 3})
What about NextWriteNoWriteConflictRange
option before .set
. How to achieve sth like:
db.doTransaction(async tn => {
tn.setOption(NextWriteNoWriteConflictRange, true)
tn.set(key, value)
})
db.doTn(async () => {
tn.setOption(fdb.TransactionOptionCode.NextWriteNoWriteConflictRange)
tn.set('foo', 'bar')
})
I just published 0.6.0 to npm which exposesfdb.TransactionOptionCode
, which wasn't public before. Give it a try
Works fine. Thank you!
Is it possible to set transaction options? Specifically I'd like to limit transaction repeating in case of conflict.