Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimistic locking not supported by Dynalite #119

Open
sateeshampolu opened this issue Dec 2, 2019 · 3 comments
Open

Optimistic locking not supported by Dynalite #119

sateeshampolu opened this issue Dec 2, 2019 · 3 comments

Comments

@sateeshampolu
Copy link

Does Dynalite support optimistic locking?

I have an integration test to prove that optimistic locking works . It work fine when running it with DynamoDb local but fails when using Dynalite.

@mhart
Copy link
Collaborator

mhart commented Dec 2, 2019

Hi @sateeshampolu – if you could post some code to reproduce, that would be great, thanks!

@sateeshampolu
Copy link
Author

Hi

I have a simple scenario.
`@DynamoDBTable(tableName = "someTable")
Class Entity {
@DynamoDBVersioned
private Long version;
@DynamoDBHashKey
private String id;
private String variableValue;
}

in a test if you do
Entity e1 = dynamoDbMapper.load(Entity.class, "ID1");
Entity e2 = dynamoDbMapper.load(Entity.class, "ID1");
e1.setVariableValue("value1")
e2.setVariableValue("value2")
dynamoDbMapper.save(e1);
dynamoDbMapper.save(e2);`

when you do this against DynamoDbLocal you get ConditionalCheckFailedException but against Dynalite it just works fine without exception.

@mhart
Copy link
Collaborator

mhart commented Dec 3, 2019

Is there a way you can debug to see what DynamoDB commands that code is issuing to the server?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants