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

Bump ibrowse to 4.4.1 #3208

Closed
wants to merge 2 commits into from
Closed

Bump ibrowse to 4.4.1 #3208

wants to merge 2 commits into from

Conversation

wohali
Copy link
Member

@wohali wohali commented Oct 9, 2020

Overview

Continuation of #437 .

Desired to improve ipv6 support, amongst other fixes. This should make @dch happy.

Testing recommendations

make check

@jiangphcn
Copy link
Contributor

Looks Jenkins is not happy and I just restarted to run make check.

@nickva
Copy link
Contributor

nickva commented May 5, 2021

Running tests locally I get:

module 'couch_replicator_attachments_too_large'
  couch_replicator_attachments_too_large:32: attachment_too_large_replication_test_ (t_should_succeed)...Unknown message recvd for "127.0.0.1":55036 -> {'EXIT',<0.1574.0>,normal}
Recvd unknown message {'EXIT',<0.1574.0>,normal} when in state: {state,
                                                                 "127.0.0.1",
                                                                 55036,
                                                                 infinity,
                                                                 #Ref<0.1159142428.3944218626.132623>,
                                                                 false,
                                                                 undefined,[],
                                                                 false,
                                                                 #Port<0.23>,
                                                                 false,[],
                                                                 {[{request,
                                                                    {url,
                                                                     "http://127.0.0.1:55036/eunit-test-db-9442d3be026365816935a64f69ce56d3/doc?new_edits=false",
                                                                     "127.0.0.1",
                                                                     55036,
                                                                     undefined,
                                                                     undefined,
                                                                     "/eunit-test-db-9442d3be026365816935a64f69ce56d3/doc?new_edits=false",
                                                                     http,
                                                                     ipv4_address},
                                                                    put,
                                                                    [{response_format,
                                                                      binary},
                                                                     {inactivity_timeout,
                                                                      30000},
                                                                     {socket_options,
                                                                      [{nodelay,
                                                                        false},
                                                                       {keepalive,
                                                                        true}]}],
                                                                    {<0.1573.0>,
                                                                     #Ref<0.1159142428.3944218625.127559>},
                                                                    undefined,
                                                                    false,
                                                                    [{nodelay,
                                                                      false},
                                                                     {keepalive,
                                                                      true}],
                                                                    -576460752303421502,
                                                                    false,
                                                                    1048576,
                                                                    false,
                                                                    undefined,
                                                                    undefined,
                                                                    false,
                                                                    binary,
                                                                    undefined,
                                                                    <<"PUT /eunit-test-db-9442d3be026365816935a64f69ce56d3/doc?new_edits=false HTTP/1.1\r\nUser-Agent: CouchDB-Replicator/3.0.0-d5038ac\r\nContent-Type: multipart/related; boundary=\"adc59da26ba0aa919162725b7b1af78d\"\r\nContent-Length: 1503\r\nAccept: application/json\r\nCookie: AuthSession=cmVwX2V1bml0X2FkbWluOjYwOTJGQzQwOh8MOR0YfNKzSKMnYeXb-BBfNx2P\r\nHost: 127.0.0.1:55036\r\n\r\n--adc59da26ba0aa919162725b7b1af78d\r\nContent-Type: application/json\r\n\r\n{\"_id\":\"doc\",\"_rev\":\"1-435cee941931b1c9833c6ce1214babc2\",\"_revisions\":{\"start\":1,\"ids\":[\"435cee941931b1c9833c6ce1214babc2\"]},\"_attachments\":{\"att\":{\"content_type\":\"app/binary\",\"revpos

This is related to the issue submitted by @rnewson to upstream ibrowse project: cmullaparthi/ibrowse#146

@nickva
Copy link
Contributor

nickva commented May 5, 2021

It looks like we call ibrowse:spawn_link_worker_process(Url) and since ibrowse had started to trap exists we can't rely on our replication workers just exiting and having the ibrowse workers they are linked to cleaned up automatically.

@nickva
Copy link
Contributor

nickva commented May 5, 2021

Based on what ibrowse author had mentioned terminate/2 should be called. But that happens only if the parent [1] process dies not any linked process. In our (CouchDB) case, we simply link to worker when we check it out from the pool so this link is not a "parent" link so that means terminate/2 won't be called and the ibrowse worker won't stop.

[1] A parent in OTP terminology is indicated by a pdict entry. And the code to call terminate/2 only when receiving 'EXIT' from parents is https://github.com/erlang/otp/blob/master/lib/stdlib/src/gen_server.erl#L480-L481

nickva added a commit that referenced this pull request May 5, 2021
@nickva
Copy link
Contributor

nickva commented May 7, 2021

The fix was merged upstream cmullaparthi/ibrowse@232f83c

We'll need to set that option in our replicator

nickva added a commit that referenced this pull request May 7, 2021
Set the `worker_trap_exits = false` setting to ensure our replication worker
pool properly cleans up worker processes.

Ref: #3208
@wohali
Copy link
Member Author

wohali commented May 7, 2021

@closing in favour of #3551 and @nickva if possible backport to 3.x appreciated, thank you!

@wohali wohali closed this May 7, 2021
nickva added a commit that referenced this pull request May 7, 2021
Set the `worker_trap_exits = false` setting to ensure our replication worker
pool properly cleans up worker processes.

Ref: #3208
nickva added a commit that referenced this pull request May 8, 2021
Set the `worker_trap_exits = false` setting to ensure our replication worker
pool properly cleans up worker processes.

Ref: #3208
nickva added a commit that referenced this pull request May 10, 2021
Set the `worker_trap_exits = false` setting to ensure our replication worker
pool properly cleans up worker processes.

Ref: #3208
nickva added a commit that referenced this pull request May 10, 2021
Set the `worker_trap_exits = false` setting to ensure our replication worker
pool properly cleans up worker processes.

Ref: #3208
nickva added a commit that referenced this pull request May 10, 2021
Set the `worker_trap_exits = false` setting to ensure our replication worker
pool properly cleans up worker processes.

Ref: #3208
@nickva nickva deleted the bump-ibrowse branch September 11, 2022 06:08
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.

None yet

4 participants