After adding or removing a doc from a large bucket I am trying to ensure views are up-to-date. I have always been able to do this by running a query with limit=0 and stale set to before. My bucket has around 861,000 docs.
With Node 10.14 and CB 2.6.1, if I run a viewQuery with limit=0 and stale set to BEFORE, it takes between 70ms and 200ms.
With Node 14.4 and CB 3.1.0, I run a query with limit = 0 and viewScanConsistency set to RequestPlus, which I think is the equivalent of stale set to BEFORE. It takes between 22000 and 35000 ms!
Both of the above tests are using CB 6.6.0.
Maybe this isn’t the best method of ensuring a view is up-to-date. If not, do you have an alternative?
My reason for wanting to use SDK 3 is because I want to update to Node 14. Given that I’ve found numerous issues with SDK 3, it doesn’t seem to be production ready and I would prefer to go back to 2.6 at this point, to allow 3 to have a bit more development and testing time. However, binaries for Node 14 are not available for SDK 2.6 and there are errors when it tries to build them. Therefore I have to use 3 at the moment.
Thanks,
Giles