[3.1.2 Backport] Revision Cache, Replications with purge_on_removal and meta.xattrs for channel assignment not purging/syncing consistently

Description

I think I am seeing a bug with utilizing some new features in the SGW 3.0.X for replications and the revision cache
xattrs is being leveraged and used for channel assignment
purge_on_removal is enabled on our replication
Replication is being filtered via access grants for the user
What I'm seeing is if we do the following actions we get inconsistent purging and replication of the documents from the Shore (Remote) to the Ship (Local - running a PULL replication). We were using the default values for the cache.rev_cache.size = 5000
Grant the replication user access to ChannelA via Admin Interface  (the only channel the user has access to)
Tag 500 document with ChannelA  by populating the meta.xattrs.userChannels
Confirm count for Shore and Ship match - everything is working
Update  all 500 documents to remove them from ChannelA
An inconsistent number of documents get removed (e.g Ship goes from 500 -> 275 or something like that)
Update the documents to be back in ChannelA - doesn't always fully replicate the documents back to the ship (e.g 275 -> 489)
If we are to disable the cache.rev_cache  by setting size = 0  the above steps will consistently purge and replicate the documents. We have not seen any issue like this if we are to remove channel access from the user and re-granting of channels.

Activity

Show:

CB robot April 8, 2024 at 10:11 PM

Build sync_gateway-3.2.0-350 contains sync_gateway commit c9e0155 with commit message:
[3.1.2 backport] : Fix rev cache multi node inconsistency (#6447)

CB robot April 8, 2024 at 9:31 PM

Build sync_gateway-3.2.0-348 contains sync_gateway commit c9e0155 with commit message:
[3.1.2 backport] : Fix rev cache multi node inconsistency (#6447)

CB robot April 8, 2024 at 8:53 PM

Build sync_gateway-3.2.0-346 contains sync_gateway commit c9e0155 with commit message:
[3.1.2 backport] : Fix rev cache multi node inconsistency (#6447)

CB robot April 8, 2024 at 8:21 PM

Build sync_gateway-3.2.0-344 contains sync_gateway commit c9e0155 with commit message:
[3.1.2 backport] : Fix rev cache multi node inconsistency (#6447)

CB robot April 8, 2024 at 7:41 PM

Build sync_gateway-3.2.0-342 contains sync_gateway commit c9e0155 with commit message:
[3.1.2 backport] : Fix rev cache multi node inconsistency (#6447)

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Story Points

Components

Sprint

Fix versions

Affects versions

Priority

Instabug

Open Instabug

PagerDuty

Sentry

Zendesk Support

Created August 25, 2023 at 4:50 PM
Updated August 31, 2024 at 11:00 AM
Resolved November 1, 2023 at 10:50 AM
Instabug