I have created a database at sync gateway with shadow bucket configured for it. PFB config file for database:
"db3": {
"server": "localhost:8091",
"bucket": "test3",
"shadow": {
"server": "localhost:8091",
"bucket": "test4"
},
"users": { "GUEST": { "disabled": false, "admin_channels": ["*"] } },
"sync": `function(doc, oldDoc) {
}`,
"event_handlers": {
"document_changed": [
{"handler": "webhook",
"url": "http://localhost:49490/test"
}
]
}
}
When I upload a document, my api (http://localhost:49490/test) is hit twice. But when I remove shadow bucket from config, it works fine and hits my api only once.
Why does it run twice with shadow bucket configured? Is it intentional or a bug?