Skip to content
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.

Retriable client #195

Merged
merged 9 commits into from
Oct 18, 2024
Merged

Conversation

taco-paco
Copy link
Contributor

Retriable clients, to keep from failing on connection errors.

@taco-paco taco-paco requested a review from varex83 September 18, 2024 03:33
@taco-paco taco-paco force-pushed the feat/horizontal/state-reconstruction branch from 4a88782 to a89ee2a Compare September 18, 2024 05:26
@taco-paco taco-paco force-pushed the feat/horizontal/retriable-client branch from 3698e90 to 8b0d2e6 Compare September 18, 2024 06:01
@taco-paco taco-paco force-pushed the feat/horizontal/state-reconstruction branch from 019668b to 53476e0 Compare September 18, 2024 06:09
@taco-paco taco-paco force-pushed the feat/horizontal/retriable-client branch from 8b0d2e6 to fa24151 Compare September 18, 2024 06:11
@varex83
Copy link
Contributor

varex83 commented Sep 20, 2024

you can fix taplo by running taplo format locally

Copy link
Contributor

@varex83 varex83 left a comment

Choose a reason for hiding this comment

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

LGTM overall

tracing.workspace = true
tracing-subscriber.workspace = true
uuid.workspace = true

lambda_runtime = "0.13.0"
lambda_http = "0.13.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

move this to the root Cargo.toml as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's needed only in lambda level

time: &DateTime<Utc>,
exclusive_start_key: &Option<HashMap<String, AttributeValue>>,
) -> Result<ScanOutput, DBScanError> {
const MAX_CAPACITY: usize = 100;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const MAX_CAPACITY: usize = 100;
const MAX_CAPACITY: i32 = 100;

wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Everything associated with array size, capacity, indexes shall be usize

#[derive(Default)]
pub enum DynamoDBAction {
#[default]
Default,
Copy link
Contributor

Choose a reason for hiding this comment

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

Just curious: why do we need the default field here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because of borrow checker in Retrier::resend_pending_actions algorithm, which is pretty much Vec::retain. Because. We need to take ownership of action to extract oneshot::sender, but we can't since its within an array we reference, so we replace is with Default.

All defaults at the end will wether be overridden or truncated

@taco-paco taco-paco force-pushed the feat/horizontal/state-reconstruction branch from 53476e0 to a18a661 Compare September 25, 2024 03:15
@taco-paco taco-paco force-pushed the feat/horizontal/retriable-client branch from 8f04023 to 57630f6 Compare September 25, 2024 03:26
@taco-paco taco-paco changed the base branch from feat/horizontal/state-reconstruction to feat/horizontal/main October 17, 2024 11:44
@taco-paco taco-paco merged commit c48f734 into feat/horizontal/main Oct 18, 2024
3 of 6 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

2 participants