Skip to content

feat: implement batch_delete - #157

Merged
bokuweb merged 8 commits into
raiden-rs:masterfrom
magurotuna:batch-delete
Sep 21, 2021
Merged

bokuweb merged 8 commits into
raiden-rs:masterfrom
magurotuna:batch-delete

Conversation

@magurotuna

Copy link
Copy Markdown
Collaborator

What does this change?

This PR does the following:

  1. implement batch_delete feature and add tests for it
  2. make all types used in derive macro absolute path (like ConditionFilledOrWaitConjunction to ::raiden::ConditionFilledOrWaitConjunction)
  3. import IntoAttribute, IntoAttrName, and DynamoDb trait at the beginning of the macro expansion

2 and 3 will allow us to derive Raiden macro without having to import other items from raiden. In other words, all we will need to import to derive is just raiden::Raiden.

What can I check for bug fixes?

I added test cases to confirm batch_delete works for basic usecases.

@magurotuna
magurotuna requested a review from bokuweb September 19, 2021 16:22
@magurotuna magurotuna changed the title feature: implement batch_delete feat: implement batch_delete Sep 19, 2021
Comment on lines +107 to +108
const RETRY: usize = 5;
const MAX_ITEMS_PER_REQUEST: usize = 25;

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now, the limit of the number of items per request is taken into account, but the limit of whole data of a request (16MB) is not. Ideally this also should be taken into account but I think it's ok for the moment, because it seems to be very rare that the data size of 25 items exceeds 16MB in total.

@bokuweb bokuweb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Looks good :)

Comment thread raiden-derive/src/lib.rs
Comment on lines +137 to +139
use ::raiden::IntoAttribute as _;
use ::raiden::IntoAttrName as _;
use ::raiden::DynamoDb as _;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@bokuweb
bokuweb merged commit 3496922 into raiden-rs:master Sep 21, 2021
@magurotuna
magurotuna deleted the batch-delete branch September 27, 2021 13:40
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.

2 participants