Skip to content

Optimistic @Version is increased when update fails due MongoSocketOpenException #4576

Closed as not planned
@michaldo

Description

@michaldo

Actual:
On save attempt @Version attribute is increased. When save fails due MongoSocketOpenException, @Version attribute is not restored
As result, when socket connection is back, save fails due OptimisticLockingFailureException

Expected:
when save fails, @Version attribute should be restored. When socket connection is back, save should succeeded.

spring-data-mongodb 4.1.5

SO question: https://stackoverflow.com/questions/77498546/optimistic-version-is-increased-when-update-fails-due-mongosocketopenexception

Metadata

Metadata

Assignees

No one assigned

    Labels

    for: stackoverflowA question that's better suited to stackoverflow.com

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions