Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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
Discussion options

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.

You must be logged in to vote

Replies: 3 comments

Comment options

@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.

You must be logged in to vote
0 replies
Comment options

Done: #6435

You must be logged in to vote
0 replies
Comment options

Hello! Reopening this discussion to make it searchable.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /