incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliffano Subagio <cliff...@gmail.com>
Subject deleted database while longpolling _changes
Date Tue, 20 Nov 2012 08:27:41 GMT
Hi,

I have a database which _changes notification is being longpolled.
I notice that when I delete this database, the response body will have
results containing an empty array, along with a last_seq property, and
status code 200.

Can the empty results array be used to identify that the database was
deleted?
Is there any other events that might result in an empty results array?


Another thing I'm curious about is the last_seq property value.
I created a new database, query dbname/_changes, it return last_seq 0 as
expected

{"results":[

],
"last_seq":0}

But when I query dbname/_changes?heartbeat=1000&feed=longpoll&since=123
I get the since parameter value as last_seq property value, like this

{"results":[
...<newlines here>
],
"last_seq":123}

What is the reasoning behind returning since parameter value 123 instead of
the real last_seq 0?
Just by checking the response body, how to determine whether last_seq 123
is really the number of changes in the database? or if 123 is only since
parameter value?


Cheers,
Cliff.

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