What happens during bootstrapping when start deploying the couchbase eventing function and why is it taking a lot of time in it ?
Couchbase buckets are sharded in to 1024 vBuckets. When you deploy a handler, it starts streaming mutations of all documents. The handler remains in “deploying state” until all 1024 vBuckets have started streaming to the handler. But during the “deploying” phase, the handlers have started processing mutations and work is actively being done on the node -it is just that it hasn’t processed at least one batch of mutations from each of the 1024 vBuckets.
If you’re not interested in running the handler through all documents, you can choose to deploy using the “From Now” option where it receives and processes only new mutations. This is typically faster, and an option if you don’t care for the handler to visit all existing documents at least once, and see only new changes after it is deployed.