Closed jkeczan closed 1 year ago
Thanks for the reports @jkeczan but I don't think "replication.enable" is doing anything unexpected here. As you can see from the code, its job is to create a document in the _replicator
database with a source and target in it.
If I were you I would just write the document yourself and you get complete control:
e.g.
const replicator = nano.db.use('_replicator')
const doc = {
source: 'https://mysourceurl.com/a',
target: 'https://myothersourceurl.com/b',
create_target: true
}
await replicator.insert(doc)
I had already figured that one out as a workaround after I posted the issue but thought it was odd that the replicate function didn't create a document that could be replicated. Appreciate the feedback.
We are having issues with creating replications using
replication.enable
. The server accepts the request but the replication document does not contain the correct replication information therefore it doesn't startExpected Behavior
When we call
replication.enable(source, target, {create_target: false})
, we expect the source of the replication document to look like the following:Current Behavior
However, we are currently getting this document instead with the replication failing to launch and the UI showing it does NOT see any credentials.
Possible Solution
At this point, I do not have a possible solution other than potentially dropping down to make a custom request. However, I feel like I am doing something incorrect here and wanted to reach out first.
Steps to Reproduce (for bugs)
Context
Right now, this is preventing me from writing an automated onboarding tool that creates the database for a user when they are added to our HR databases.
Your Environment