You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Adam Kocoloski (JIRA)" <ji...@apache.org> on 2008/09/09 19:29:44 UTC
[jira] Created: (COUCHDB-119) incremental local-remote replication
broken: record documents have different formats
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
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.
[jira] Commented: (COUCHDB-119) incremental local-remote
replication broken: record documents have different formats
Posted by "Chris Anderson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12633959#action_12633959 ]
Chris Anderson commented on COUCHDB-119:
----------------------------------------
fixed in r698333 - however, this bug is hard to test for, using the current replication status response.
> 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_rep.diff, 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.
[jira] Resolved: (COUCHDB-119) incremental local-remote replication
broken: record documents have different formats
Posted by "Chris Anderson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-119?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chris Anderson resolved COUCHDB-119.
------------------------------------
Resolution: Fixed
> 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_rep.diff, 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.
[jira] Commented: (COUCHDB-119) incremental local-remote
replication broken: record documents have different formats
Posted by "Adam Kocoloski (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12629969#action_12629969 ]
Adam Kocoloski commented on COUCHDB-119:
----------------------------------------
Cool, that's definitely a better patch. Regards,
Adam
> 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_rep.diff, 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.
[jira] Updated: (COUCHDB-119) incremental local-remote replication
broken: record documents have different formats
Posted by "Chris Anderson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-119?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chris Anderson updated COUCHDB-119:
-----------------------------------
Attachment: incremental_rep.diff
Adam,
Thanks for finding this! (it's another JSON regression...)
This patch here should fix the problem without requiring the JSON round trip.
> 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_rep.diff, 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.
[jira] Updated: (COUCHDB-119) incremental local-remote replication
broken: record documents have different formats
Posted by "Adam Kocoloski (JIRA)" <ji...@apache.org>.
[ 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.