You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Michael Stapelberg (JIRA)" <ji...@apache.org> on 2010/09/06 23:07:33 UTC

[jira] Created: (COUCHDB-879) [PATCH] Replication fails due to {stream_to, {self(), once}} parameter

[PATCH] Replication fails due to {stream_to, {self(), once}} parameter
----------------------------------------------------------------------

                 Key: COUCHDB-879
                 URL: https://issues.apache.org/jira/browse/COUCHDB-879
             Project: CouchDB
          Issue Type: Bug
          Components: Replication
    Affects Versions: 1.0.1
         Environment: Linux midna 2.6.32.8-midna-2 #2 SMP Tue Feb 16 20:27:34 CET 2010 x86_64 GNU/Linux

            Reporter: Michael Stapelberg
         Attachments: couchdb-replication.patch

When testing replication (with SSL and apache's mod_proxy, so you might need the patch from #878) I noticed that erlang's ssl sometimes needs to send multiple messages. However, due to the {stream_to, {self(), once}} option when calling ibrowse, only the first message gets delivered (which includes only the first chunk). When modifying the option to {stream_to, self()}, replication works fine.

Please thoroughly check the attached patch for side-effects (I'm not sure why {self(), once} was used in the first place).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-879) [PATCH] Replication fails due to {stream_to, {self(), once}} parameter

Posted by "Adam Kocoloski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12906679#action_12906679 ] 

Adam Kocoloski commented on COUCHDB-879:
----------------------------------------

{self(), once} is used for flow control - without it, ibrowse continues to download the _changes feed regardless of the progress of the other phases of the replication.  If the source database is large this can cause serious memory consumption issues.

If the 'once' option is really a no-go for SSL we could fall back to requesting a limited number of rows from the _changes feed and doing multiple requests, rather than consuming a single mammoth response row-by-row.

> [PATCH] Replication fails due to {stream_to, {self(), once}} parameter
> ----------------------------------------------------------------------
>
>                 Key: COUCHDB-879
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-879
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Replication
>    Affects Versions: 1.0.1
>         Environment: Linux midna 2.6.32.8-midna-2 #2 SMP Tue Feb 16 20:27:34 CET 2010 x86_64 GNU/Linux
>            Reporter: Michael Stapelberg
>         Attachments: couchdb-replication.patch
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> When testing replication (with SSL and apache's mod_proxy, so you might need the patch from #878) I noticed that erlang's ssl sometimes needs to send multiple messages. However, due to the {stream_to, {self(), once}} option when calling ibrowse, only the first message gets delivered (which includes only the first chunk). When modifying the option to {stream_to, self()}, replication works fine.
> Please thoroughly check the attached patch for side-effects (I'm not sure why {self(), once} was used in the first place).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (COUCHDB-879) [PATCH] Replication fails due to {stream_to, {self(), once}} parameter

Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-879?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Joseph Davis updated COUCHDB-879:
--------------------------------------

    Skill Level: Regular Contributors Level (Easy to Medium)

> [PATCH] Replication fails due to {stream_to, {self(), once}} parameter
> ----------------------------------------------------------------------
>
>                 Key: COUCHDB-879
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-879
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Replication
>    Affects Versions: 1.0.1
>         Environment: Linux midna 2.6.32.8-midna-2 #2 SMP Tue Feb 16 20:27:34 CET 2010 x86_64 GNU/Linux
>            Reporter: Michael Stapelberg
>         Attachments: couchdb-replication.patch
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> When testing replication (with SSL and apache's mod_proxy, so you might need the patch from #878) I noticed that erlang's ssl sometimes needs to send multiple messages. However, due to the {stream_to, {self(), once}} option when calling ibrowse, only the first message gets delivered (which includes only the first chunk). When modifying the option to {stream_to, self()}, replication works fine.
> Please thoroughly check the attached patch for side-effects (I'm not sure why {self(), once} was used in the first place).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (COUCHDB-879) [PATCH] Replication fails due to {stream_to, {self(), once}} parameter

Posted by "Michael Stapelberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-879?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Stapelberg updated COUCHDB-879:
---------------------------------------

    Attachment: couchdb-replication.patch

> [PATCH] Replication fails due to {stream_to, {self(), once}} parameter
> ----------------------------------------------------------------------
>
>                 Key: COUCHDB-879
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-879
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Replication
>    Affects Versions: 1.0.1
>         Environment: Linux midna 2.6.32.8-midna-2 #2 SMP Tue Feb 16 20:27:34 CET 2010 x86_64 GNU/Linux
>            Reporter: Michael Stapelberg
>         Attachments: couchdb-replication.patch
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> When testing replication (with SSL and apache's mod_proxy, so you might need the patch from #878) I noticed that erlang's ssl sometimes needs to send multiple messages. However, due to the {stream_to, {self(), once}} option when calling ibrowse, only the first message gets delivered (which includes only the first chunk). When modifying the option to {stream_to, self()}, replication works fine.
> Please thoroughly check the attached patch for side-effects (I'm not sure why {self(), once} was used in the first place).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.