In case #2 article asks us to undeploy the function created for case #1. why? is it because that function will also be triggered, and try to upsert same doc?
In both the cases, article made some changes in db, then created/deployed the functions. Does it mean that couchbase stores all the mutation history somewhere, and as and when I create some eligible function, it gets automatically applied to all the existing mutations? I read in the docs, that couchbase doesn’t store these mutations indefinitely, but didn’t got much detail - like for how long, etc…
If I had a scenario like this where I would like to run a certain function on all existing mutation ever occured in some collection, can I rely on couchbase to be storing all these mutations? Or should I look for some other solutioning?
I’m not an the eventing expert, but I did look at the examples.
Looking at the instructions - there are two independent cases. And undeploying the function for case #1 would be to keep them independent. You could try not undeploying the first one and see if both are triggered.
Isn’t that what step 8 in case #1 demonstrates? (I believe there is a typo in the description of the result where it says ‘without’ instead of ‘with’ while the data definitely shows it is ‘with’ the two new properties).
It seems that it would not be necessary to store the “mutations” to create/modify a document BEFORE the function is deployed as the existing document is sufficient to record that it was created.