hi
I delete a bucket and recreate it. then the couchbase lite client will resync data from its local database. I inspect the server CPU status, it’s running very high.
When Sync Gateway syncs to a CB Server bucket, it needs to create a bunch of meta data. This can be pretty CPU intensive. I know this may sound trite, but I’d avoid deleting buckets in general, if you can.
Having said that, it looks like the problem is with determining channel access and the N1QL query that needs to perform. @adamf any thoughts on this?
The high number of access grants for the same principal suggests that the docs you are pushing are all triggering new (redundant?) access grant for the same user. That may account for some of the CPU usage you’re seeing.
thanks for you reply. I make a mistake in sync gateway function, I use access() to every document, but in my scenes not need to do it. access() will occupy very high CPU resources when Concurrent. I already fix this issue.