You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Sebastian Ziebell <se...@asquera.de> on 2013/12/18 18:41:47 UTC

Handling ETags from two slaves

Hello,

I have a question regarding the ETag generation of CouchDb.

Our setup consists of one master node and two slaves that replicate a database from master (all run on CouchDb version 1.3.0). The web application gets the response from either slave.

Is there a way to ensure that both CouchDb slaves return the same ETag for the same view when they provide identical results? I tested several views and even when the results are identical (matching MD5 hashes) the responses contain different ETags from the two slaves. According to the documentation different properties are incorporated into the ETag generation, e.g. doc ids, user name etc., but these properties are the same for both slaves. Do I miss something obvious or is it just not possible?

Regards,
Sebastian

Re: Handling ETags from two slaves

Posted by Paul Davis <pa...@gmail.com>.
View etags implicitly depend on update orderings that are not
guaranteed over replication.

Or to say that slightly differently, you would only have identical
view ETags if you could guarantee that you made the same exact updates
in the same exact order on both nodes (which is something that
replication doesn't/can't guarantee).

On Wed, Dec 18, 2013 at 11:41 AM, Sebastian Ziebell
<se...@asquera.de> wrote:
> Hello,
>
> I have a question regarding the ETag generation of CouchDb.
>
> Our setup consists of one master node and two slaves that replicate a database from master (all run on CouchDb version 1.3.0). The web application gets the response from either slave.
>
> Is there a way to ensure that both CouchDb slaves return the same ETag for the same view when they provide identical results? I tested several views and even when the results are identical (matching MD5 hashes) the responses contain different ETags from the two slaves. According to the documentation different properties are incorporated into the ETag generation, e.g. doc ids, user name etc., but these properties are the same for both slaves. Do I miss something obvious or is it just not possible?
>
> Regards,
> Sebastian