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

dynamo v2: featuring aws-sdk-go-v2 #232

Merged
merged 36 commits into from
Jun 15, 2024
Merged

dynamo v2: featuring aws-sdk-go-v2 #232

merged 36 commits into from
Jun 15, 2024

Conversation

guregu
Copy link
Owner

@guregu guregu commented May 4, 2024

(This is a continuation of #206, fresh PR without merge conflicts).

At last, the long awaited dynamo/v2! This keeps mostly the same API as v1 but uses the new AWS SDK.

Changes:

  • All operations require a context.Context now, removed ...WithContext methods
  • Uses int instead of int64 for limits
  • PagingIter.LastEvaluatedKey can return an error now (in exceedingly rare circumstances, but better safe than sorry)
    • No need for a debug logger anymore because of this
  • KMSMasterKeyArn renamed to KMSMasterKeyARN
  • Request retrying relies on the AWS client now, and can be configured using its options

I believe v2 should be ready for testing now. You can try it out now with:

go get github.com/guregu/dynamo/v2@v2-dev

I would really appreciate it if people test it before the official release.
I will release this after I get some feedback. Or, if I don't get any, within a few weeks.

@guregu guregu mentioned this pull request May 4, 2024
guregu added 3 commits May 5, 2024 05:56
Query/Scan.limit isn't bound by DynamoDB API limits, so it can exceed MaxInt32
Make scan segmentation > MaxInt32 an error
@sgriffith3
Copy link

@guregu Any reason you are holding this PR open any longer?

@guregu
Copy link
Owner Author

guregu commented Jun 7, 2024

@guregu Any reason you are holding this PR open any longer?

There were some encoding bugs that should hopefully be all taken care of now, haven't heard anything new. Has anyone tried running this (even against their test suite)? Would be nice to get some feedback.

@sgriffith3
Copy link

My team has prioritized testing this on our infrastructure for you. We will be able to work on this over the next several business days.

Are there any specific tests that you would like us to run for this, or just generally make sure it is working as expected?

@guregu
Copy link
Owner Author

guregu commented Jun 8, 2024

My team has prioritized testing this on our infrastructure for you. We will be able to work on this over the next several business days.

Are there any specific tests that you would like us to run for this, or just generally make sure it is working as expected?

Awesome, thank you! Much appreciated.
The biggest changes are related to encoding/decoding, so if you have any code that uses custom encoding methods and stuff it might be a good place to focus on. Besides that, in v1 there was a lot of custom retrying code that has been delegated to the AWS SDK itself in v2; I'm curious if the new defeaults match user expectations (biggest area I could see this affect is: throttling on busy tables, and read/write transactions being canceled due to concurrent modification).
However I think just running it on a codebase is enough to help test it. Thanks!

@sgriffith3
Copy link

Unfortunately, our use case does not include custom encoding nor practically any concurrent modification. But I can confirm that running it on our code base works as expected!

@guregu
Copy link
Owner Author

guregu commented Jun 13, 2024

That is good news, thanks. It looks like we are ready then. I'll make the release this week, within a day or two, as soon as I get some free time.

@guregu guregu merged commit ab7d057 into master Jun 15, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants