couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Marino <mmar...@gmail.com>
Subject update_seq different in view query vs design-doc/_info?
Date Thu, 26 Jun 2014 08:10:03 GMT
Hi all,

The following was written to the user list about a month ago, but received
no response so I thought it appropriate to send to the dev list since it
might require some more technical know-how.  Also, I believe the following
is either due to a bug or due to incorrect documentation.  Thanks for you
help, and please let me know if I should rather post elsewhere and/or post
a JIRA.

I have a question regarding the update_seq returned with the two methods:

1.  /db/_design/ddoc/_info
   (in the view_index object)

2.  /db/_design/ddoc/_view/view_name?update_seq=true
   (+ other query strings in principle)

I am finding that the update_seq is not always the same between 1 and 2,
even though I would expect it to be, at least given the documents:

http://couchdb.readthedocs.org/en/1.5.x/api/ddoc/common.html#db-design-design-doc-info

http://couchdb.readthedocs.org/en/1.5.x/api/ddoc/views.html

The second of which says:
"In addition to using stale views, you can also make use of the update_seq
query argument. Using this query argument generates the view information
including the update sequence of the database from which the view was
generated. The returned value can be compared this to the current update
sequence exposed in the database information (returned by GET /{db})."

I would like to be able to compare the #2 update_seq value with the
update_seq gotten from GET /db, but this doesn't seem to be reliable.
 Here's an example taken from performing 1 and 2 right after each other:

1.
{u'name': u'execute_commands',
 u'view_index': {u'compact_running': False,
                 u'data_size': 9915,
                 u'disk_size': 200822,
                 u'language': u'javascript',
                 u'purge_seq': 0,
                 u'signature': u'6a6068421d1c10bd8819736505b31f4b',
                 u'update_seq': 409478,
                 u'updater_running': False,
                 u'waiting_clients': 0,
                 u'waiting_commit': True}}

2.
{u'rows': [{u'key': None, u'value': 50}], u'update_seq': 343094}

I think this is due to the fact that this one particular view does not emit
that often.  The question is, is this expected?  That is, should I not
expect that the update_seq in 2 is not the same as that in 1?

Cheers,
Mike

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message