You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Robert Newson (JIRA)" <ji...@apache.org> on 2010/11/18 15:35:14 UTC

[jira] Created: (COUCHDB-956) Return all _seq values as strings not integers

Return all _seq values as strings not integers
----------------------------------------------

                 Key: COUCHDB-956
                 URL: https://issues.apache.org/jira/browse/COUCHDB-956
             Project: CouchDB
          Issue Type: Improvement
            Reporter: Robert Newson


Some fields are returned as strings in db_info and other places to protect against numeric overflow;

{"db_name":"db","doc_count":0,"doc_del_count":0,"update_seq":0,"purge_seq":0,"compact_running":false,"disk_size":79,"instance_start_time":"1290088043619158","disk_format_version":5,"committed_update_seq":0}

here, instance_start_time is protected but, more critically, update_seq is not.

If update_seq were to be wrapped due to precision issues, what breaks?


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


[jira] Commented: (COUCHDB-956) Return all _seq values as strings not integers

Posted by "Randall Leeds (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-956?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12933540#action_12933540 ] 

Randall Leeds commented on COUCHDB-956:
---------------------------------------

I think it's actually important that the high watermark is based on position in the input sequence or the worst that happens is documents are missed.

Last I looked at it the best solution that came to mind was to actually assign a local ephemeral sequence *within this replication session* to changes as they arrived for the purposes of tracking the high watermark during parallel fetching.

> Return all _seq values as strings not integers
> ----------------------------------------------
>
>                 Key: COUCHDB-956
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-956
>             Project: CouchDB
>          Issue Type: Improvement
>            Reporter: Robert Newson
>             Fix For: 2.0
>
>
> Some fields are returned as strings in db_info and other places to protect against numeric overflow;
> {"db_name":"db","doc_count":0,"doc_del_count":0,"update_seq":0,"purge_seq":0,"compact_running":false,"disk_size":79,"instance_start_time":"1290088043619158","disk_format_version":5,"committed_update_seq":0}
> here, instance_start_time is protected but, more critically, update_seq is not.
> If update_seq were to be wrapped due to precision issues, what breaks?

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


[jira] Updated: (COUCHDB-956) Return all _seq values as strings not integers

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

Adam Kocoloski updated COUCHDB-956:
-----------------------------------

    Fix Version/s: 2.0

Yes, it would be a good idea not to sort them.  If I recall correctly, the reason for the sorting is that the reader will rearrange documents through its use of parallel connections.  But really, we can leave them unsorted.  Worst that will happen is that a few documents get checked again on the next replication.

> Return all _seq values as strings not integers
> ----------------------------------------------
>
>                 Key: COUCHDB-956
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-956
>             Project: CouchDB
>          Issue Type: Improvement
>            Reporter: Robert Newson
>             Fix For: 2.0
>
>
> Some fields are returned as strings in db_info and other places to protect against numeric overflow;
> {"db_name":"db","doc_count":0,"doc_del_count":0,"update_seq":0,"purge_seq":0,"compact_running":false,"disk_size":79,"instance_start_time":"1290088043619158","disk_format_version":5,"committed_update_seq":0}
> here, instance_start_time is protected but, more critically, update_seq is not.
> If update_seq were to be wrapped due to precision issues, what breaks?

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


[jira] Commented: (COUCHDB-956) Return all _seq values as strings not integers

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

Adam Kocoloski commented on COUCHDB-956:
----------------------------------------

The replicator sorts sequence values from the rows it has processed in the _changes feed to ensure that it always checkpoints at the highest one possible.  Sorting them as strings results in the replicator skipping checkpoints after it reaches a sequence with a number of leading 9s.

> Return all _seq values as strings not integers
> ----------------------------------------------
>
>                 Key: COUCHDB-956
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-956
>             Project: CouchDB
>          Issue Type: Improvement
>            Reporter: Robert Newson
>
> Some fields are returned as strings in db_info and other places to protect against numeric overflow;
> {"db_name":"db","doc_count":0,"doc_del_count":0,"update_seq":0,"purge_seq":0,"compact_running":false,"disk_size":79,"instance_start_time":"1290088043619158","disk_format_version":5,"committed_update_seq":0}
> here, instance_start_time is protected but, more critically, update_seq is not.
> If update_seq were to be wrapped due to precision issues, what breaks?

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


[jira] Commented: (COUCHDB-956) Return all _seq values as strings not integers

Posted by "Randall Leeds (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-956?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12933507#action_12933507 ] 

Randall Leeds commented on COUCHDB-956:
---------------------------------------

How do we feel about just keeping the order in which they arrive and not trying to sort them.
I feel like the responsibility should be on the server to provide a _changes feed in the correct order.

> Return all _seq values as strings not integers
> ----------------------------------------------
>
>                 Key: COUCHDB-956
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-956
>             Project: CouchDB
>          Issue Type: Improvement
>            Reporter: Robert Newson
>
> Some fields are returned as strings in db_info and other places to protect against numeric overflow;
> {"db_name":"db","doc_count":0,"doc_del_count":0,"update_seq":0,"purge_seq":0,"compact_running":false,"disk_size":79,"instance_start_time":"1290088043619158","disk_format_version":5,"committed_update_seq":0}
> here, instance_start_time is protected but, more critically, update_seq is not.
> If update_seq were to be wrapped due to precision issues, what breaks?

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