Hey guys, dealing with dynamodb "look up then writ...
# help
a
Hey guys, dealing with dynamodb "look up then write" concurrency problem. It seems you can't put both a read and write dynamodb operation in the same transaction, so I've searched a bit for other solution and found the use of a lock flag in a dynamodb table and using a write with conditionexpression to try to acquire the lock, but my question is how to then wait and try to reacquire when lock could not be gotten
Or maybe you have a simpler way to deal with the problem? My concrete case is that I have to find a max value and then write an item with +1 of that value.
r
Does this help you ?
a
Not really. Sometimes you have to do a locked read and write, otherwise there wouldn't be a Java library for dynamodb locks
Ok that was formulated a bit wrong, sorry about that, what I meant is, that yes, it does help me in the actual current case, and thanks for linking me the article, but it does not solve all cases that would need a locked read and write
I guess I'm just going to implement my own mutex
d