Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order of operation error #41

Open
cboden opened this issue Apr 21, 2017 · 3 comments
Open

Order of operation error #41

cboden opened this issue Apr 21, 2017 · 3 comments

Comments

@cboden
Copy link

cboden commented Apr 21, 2017

In my bootstrap folder I'm creating a document in _replicator to replicate from one database setup via bootstrap to another database setup via bootstrap. It seems because _replicator comes first alphabetically it's parsed by couchdb-bootstrap first before the other databases are setup. This is causing the replication document created to fail.

The replicator document shows _replication_state is error and _replication_state_reason is

Couldn't open document _design/myddocname from source database models: {error,<<"not_found">>}

I either have to run setup twice or re-save the replicator document to fix the error.

@jo
Copy link
Owner

jo commented May 9, 2017

Hi @cboden, a possible workaround could also be to add create_target:true to the replication document. That way the database will be created if needed. The CouchDB Bootstrap suite only creates the database if it does not exist.

I will have a look at #40. I see your point that system databases should be handled differently.

@cboden
Copy link
Author

cboden commented May 15, 2017

Unfortunately create_target: true did not work as my replication is filtered. The replicator is looking for the design doc in the source database that does not exist yet.

@jo
Copy link
Owner

jo commented May 15, 2017

I see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants