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

bug: backup quetly exit with 0 when server side is dropping connection #527

Closed
eiri opened this issue Nov 8, 2022 · 3 comments
Closed
Assignees
Milestone

Comments

@eiri
Copy link
Member

eiri commented Nov 8, 2022

When server side drops connection mid-response backup stops on the last valid batch and exits with 0 without calling on.('finished') function.

The root cause is a bug in axios 0.x where client quietly drops response without raising 'connection abort' exception when response is compressed. e.g. header Accept-Encoding set to gzip or *.

This bug fixed in axios 1.x, but unfortunately we'd need for sdk-core to move on it first, then release new cloudant-sdk and only then get this fix in backup, which potentially looks like quite long wait.

Alternative approach could be to try to switch only backup to axios 1.x and force core to work with it, though this sounds like a typical node deps' hell.

Another alternative could be to detect and raise this condition in cloudant-sdk BaseService with axios response interceptor or event listener on a custom Agent. However this requires a spike to investigate how feasible it is.

@ricellis
Copy link
Member

ricellis commented Nov 16, 2022

Based on the progress over the last week I think the best course of action here is to wait for the axios 1.2.0 1.2.1 release and subsequent merge of IBM/node-sdk-core#217 and consume those updated deps in cloudant-node-sdk and then here.

@ricellis
Copy link
Member

ricellis commented Jan 5, 2023

See #542

@ricellis ricellis added this to the 2.next milestone Jan 6, 2023
@ricellis
Copy link
Member

ricellis commented Jan 6, 2023

This is fixed in 2.9.6.

@ricellis ricellis closed this as completed Jan 6, 2023
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

No branches or pull requests

2 participants