couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Kocoloski (JIRA)" <j...@apache.org>
Subject [jira] Updated: (COUCHDB-119) incremental local-remote replication broken: record documents have different formats
Date Tue, 09 Sep 2008 17:31:44 GMT

     [ https://issues.apache.org/jira/browse/COUCHDB-119?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Adam Kocoloski updated COUCHDB-119:
-----------------------------------

    Attachment: incremental_replication_patch.diff

sends local docs through a JSON roundtrip to get them in the same format as the remote replication
history docs.

> incremental local-remote replication broken: record documents have different formats
> ------------------------------------------------------------------------------------
>
>                 Key: COUCHDB-119
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-119
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core
>         Environment: Erlang/OTP R12B-3, CouchDB trunk@690670
>            Reporter: Adam Kocoloski
>            Priority: Minor
>             Fix For: 0.9
>
>         Attachments: incremental_replication_patch.diff
>
>
> If I turn on debug-level messages in CouchDB trunk (690670) and run the replication portion
of the test suite, I see messages like the following.  The (local) source DB record is represented
using atoms for the document attributes, but the record in the (remote) target DB is represented
using binary strings.  The result is that the replication in this case (and in the remote
source-local target case) starts from sequence 0 every time.
> [info] [<0.250.0>] 127.0.0.1 - - 'GET' /test_suite_db_b/_local/mbp:test_suite_db_a:http://127.0.0.1:5984/test_suite_db_b
200
> [debug] [<0.63.0>] Found existing replication record on target
> [info] [<0.63.0>] Replication records differ. Performing full replication instead
of incremental.
> [debug] [<0.63.0>] Record on source:[{session_id,<<"ff21c6245d467bfce2916b8a6315ddf0">>},
>                   {source_last_seq,10},
>                   {history,[{[{start_time,<<"Tue, 09 Sep 2008 17:09:15 GMT">>},
>                               {end_time,<<"Tue, 09 Sep 2008 17:09:16 GMT">>},
>                               {start_last_seq,0},
>                               {end_last_seq,10},
>                               {missing_checked,10},
>                               {missing_found,10},
>                               {docs_read,10},
>                               {docs_written,10}]}]}]
> Record on target:[{<<"session_id">>,<<"ff21c6245d467bfce2916b8a6315ddf0">>},
>                   {<<"source_last_seq">>,10},
>                   {<<"history">>,
>                    [{[{<<"start_time">>,<<"Tue, 09 Sep 2008 17:09:15
GMT">>},
>                       {<<"end_time">>,<<"Tue, 09 Sep 2008 17:09:16
GMT">>},
>                       {<<"start_last_seq">>,0},
>                       {<<"end_last_seq">>,10},
>                       {<<"missing_checked">>,10},
>                       {<<"missing_found">>,10},
>                       {<<"docs_read">>,10},
>                       {<<"docs_written">>,10}]}]}]
> One possible patch is to encode/decode the local replication doc before the comparison,
but maybe the developers have a better solution.

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


Mime
View raw message