CouchDB Continuous Filtered Replication - UserCtx Change

I am not sure whether this is the right forum to ask couchdb related queries but my problem is:
I am doing Continuous Filtered Replication between DB1 (source) and DB2 (target). The filter logic is based on user’s role (user context). Here is my scenario:

  1. In _users database, for user1 role is [project1]
  2. I start the continuous filtered replication.
  3. Do any change in project1 in DB1, it gets replicated to DB2
  4. Change user1 role (in _users db) from [project1] to [project1,project2]
  5. Do any change in project2 in DB1, it doesnt get replicated to DB2.

Important Observations:
A) In my filter i am printing user roles. Even after step 4, my filter prints roles as [project1].
B) After step 3, it i stop filtered continuous replication and start it again, then after step 4, my filter prints roles as [project1,project2] and hence step5 becomes successful.

I dont want to restart filtered continuous replication after any change to role in _users DB. Is there any solution for this. I am trying to achieve 1 DB per user implementation.

Hi @catchsandeepvaid,

Indeed this is not the right place for CouchDB questions. Couchbase and CouchDB are two different pieces of software. Some people on this forum might be familiar with CouchDB, but your probably better off asking on the CouchDB site or even Stack Overflow.