Skip to content

A better fix for handling node local 413 responses - #1403

Merged
nickva merged 1 commit into
apache:fix-erlang-21-eunit-failuresfrom
cloudant:fix-erlang-21-eunit-failures-fix-replicator-test
Jun 22, 2018
Merged

A better fix for handling node local 413 responses#1403
nickva merged 1 commit into
apache:fix-erlang-21-eunit-failuresfrom
cloudant:fix-erlang-21-eunit-failures-fix-replicator-test

Conversation

@nickva

@nickva nickva commented Jun 22, 2018

Copy link
Copy Markdown
Contributor

During 21.0 testing, the hack to read extra data from the socket to give the
client a better chance of detecting a 413 response ended up failing. Either
process scheduling or IO scheduling was different enough that the test started
failing fairly consistently.

Apply a better fix that's more in-line with the intent -- after responding to
the client with a 413, read a limited amount of data off the socket (1MB).
Limit the maximum time spent doing it to less than 1 second.

Issue #1396

During 21.0 testing, the hack to read extra data from the socket to give the
client a better chance of detecting a 413 response ended up failing. Either
process scheduling or IO scheduling was different enough that the test started
failing fairly consistently.

Apply a better fix that's more in-line with the intent -- after responding to
the client with a 413, read a limited amount of data off the socket (1MB).
Limit the maximum time spent doing it to less than 1 second.

Issue apache#1396

@eiri eiri 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.

That 1Mb drain is it arbitrary? In this case is it 100 times better than reading 10k? :)

+1 anyhow, this looks less hacky than attempt to read nothing in no time.

@nickva

nickva commented Jun 22, 2018

Copy link
Copy Markdown
Contributor Author

@eiri thank you!

@nickva
nickva merged commit 4ad5b32 into apache:fix-erlang-21-eunit-failures Jun 22, 2018
@nickva
nickva deleted the fix-erlang-21-eunit-failures-fix-replicator-test branch June 22, 2018 16:06
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