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

Add retry to putRecord(s) #109

Merged

Conversation

kenzable
Copy link
Collaborator

No description provided.

eaviles
eaviles previously approved these changes Apr 23, 2019
Copy link
Member

@eaviles eaviles left a comment

Choose a reason for hiding this comment

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

Something to think about, do we want to retry on any error? Is there any chance a record is actually sent but we get like a "network" disconnected error and we end up sending the same record twice? Do we want to instead retry on the errors we know? (throughput exceptions, etc)

.putRecord(...args)
.promise()
.catch(err => {
if (shouldBailRetry(err)) bail(err);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Only retry if throughput exception.

throw errObj;
})
.catch(err => {
if (shouldBailRetry(err)) bail(err);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Only retry on throughput exception.

@kenzable kenzable merged commit 6a701b7 into develop Apr 23, 2019
@kenzable kenzable deleted the feature/implement-write-retry-on-throughput-exception branch April 23, 2019 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants