Thanks for the reply. My understanding is that in my second scenario, I can't say database is in consistent state
from the logical point of conversation scopeQuote:
Scenario2:
Request1 : read entity1 (version =0)
OtherRequest : read entity1 (version =0)
Request1 : update entity1 and commit -> entity.version is set from 0 to 1 (1 is now on database)
OtherRequest : update entity1 and commit -> entity1.version (0) != version on database (1) --> rollback due optimistic Exception
say 'other request' happens in the time between request1 and request 2.
request1 : success : final result entity 1 with version=1 // transaction finished
'other request' : success : final result entity 1 with version=2 // transaction finished
request 2 : done
request 3 : update entity1 and commit : -> entity1.version (1) != version on database (2) ->fails and rolls back transaction.
so from the conversation point of view, it is not atomic, because request 3 has rolled back but request 1 can't be rolled back.