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:
- In _users database, for user1 role is [project1]
- I start the continuous filtered replication.
- Do any change in project1 in DB1, it gets replicated to DB2
- Change user1 role (in _users db) from [project1] to [project1,project2]
- Do any change in project2 in DB1, it doesnt get replicated to DB2.
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.