Couchbase view query failed

we are using the couchbase 4.0 CE with 3 nodes in cluster . one nodes went down and failover is happened in cluster. but we are getting the below error in syncgateway logs.
also same issue when manually tried querying the view in couchbase.
WARNING: Error trying to query ViewPrincipals: error executing view req at http://xx.xx.xx.xx:8092/xx/_design/sync_gateway/_view/principals?limit=1&stale=false: 500 Internal Server Error - {“error”:“error”,“reason”:“revision_sync_failed”}
can anyone help us on this.

I have recently upgraded to 4.1.1 CE but could see that same issue observed when one of node in couchbase failovered. please help.

What’s happening in your setup:
View-engine retries MAX_RETRIES times with pause of RETRY_INTERVAL each time and eventually it will dump revision_sync_failed message[1] if things fails during all those retries. Within the loop, view-engine tries to make sure version of design document is consistent across nodes[2]. Cluster manager is supposed to handle ddoc replication across nodes, for whatever reason that seems to have some problem.

  1. http://src.couchbase.org/source/xref/trunk/couchdb/src/couch_index_merger/src/couch_index_merger.erl#103
  2. http://src.couchbase.org/source/xref/trunk/couchdb/src/couch_index_merger/src/couch_index_merger.erl#128

Not sure about the issue type. Issue observed after autofailover of node.