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 SENT_SYNC_RECORDS which is the callback of SEND_SYNC_RECORDS #358

Merged
merged 1 commit into from Nov 8, 2019

Conversation

@darkdh
Copy link
Member

darkdh commented Nov 7, 2019

fix #356

gives back full records when all records are successfully uploaded
or partial records/empty records when error occurred.

@darkdh darkdh self-assigned this Nov 7, 2019
})
)
})
Promise.all(promisePuts).then((records) => {

This comment has been minimized.

Copy link
@SergeyZhukovsky

SergeyZhukovsky Nov 7, 2019

Member

What happens if some records from records failed to send? We still send the whole array in the call back.

This comment has been minimized.

Copy link
@darkdh

darkdh Nov 7, 2019

Author Member

that would be caught in the following blocks, partial records will be sent back

This comment has been minimized.

Copy link
@darkdh

darkdh Nov 7, 2019

Author Member

the records here is each record return from bufferedPut promises

This comment has been minimized.

Copy link
@darkdh

darkdh Nov 7, 2019

Author Member

if this isn't clear, I can use separate array to store "SentRecords"

This comment has been minimized.

Copy link
@SergeyZhukovsky

SergeyZhukovsky Nov 7, 2019

Member

maybe let's just use there something like sentRecords instead of records in the second promise? It would be less confusing in that case.

This comment has been minimized.

Copy link
@darkdh

darkdh Nov 7, 2019

Author Member

fixed in 4ca1dbb

@darkdh darkdh force-pushed the put-cb branch from eee362c to d5fd429 Nov 7, 2019
Copy link
Member

SergeyZhukovsky left a comment

++

@AlexeyBarabash
Copy link
Contributor

AlexeyBarabash commented Nov 8, 2019

Is it possible to add a testcase?

@darkdh
Copy link
Member Author

darkdh commented Nov 8, 2019

we don't have any tests for this "interface" side of code, object put test is covered in test/client/requestUtil.js

Copy link
Contributor

AlexeyBarabash left a comment

++

@darkdh darkdh merged commit ba778d1 into staging Nov 8, 2019
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@darkdh darkdh deleted the put-cb branch Nov 8, 2019
darkdh added a commit that referenced this pull request Nov 8, 2019
Add SENT_SYNC_RECORDS which is the callback of SEND_SYNC_RECORDS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

4 participants
You can’t perform that action at this time.