Custom Versioning startAt parameter does not appear to work when setting to 0 #6434
Unanswered
balverez
asked this question in
Migration from v1 to v2
Replies: 3 comments
-
@balverez can you open a Github issue and provide all the info we ask in the templates, specially a sample code we can use to reproduce and the SDK version? That feature was released in v2.32.7. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Done: #6435 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey team, I am on a team that has many legacy DDB tables utilizing the previous DDB SDK. We are planning out the migration to SDK v2 and in exploring the SDK differences I discovered a particularly sharp pain point in the handling of versioning for optimistic locking.
I was excited for the custom versioning change released and documented in #6019 but it does not appear to be working as expected.
Our tables have millions of entries with Number version fields initialized to 0. I've been testing the new custom versioning changes for the DynamoDbVersionAttribute annotation and VersionedRecordExtension extension and the startAt parameter does not appear to be working as expected, specifically with the value 0. I can set a different non-negative positive integer and it works as expected, but any time I call PutItem with a new data model and have startAt set to 0, the version number is set to 1.
Even if I create a table entry and modify it to have version equal to 0 prior to a programmatic UpdateItem call, the UpdateItem call on the model fails with a conditional check exception. This does not appear to be the intended behavior given the discussion in the PR.
Beta Was this translation helpful? Give feedback.
All reactions