-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Custom replication DBs never get /_scheduler/docs entries #506
Comments
Thanks for taking a look! By default scheduling replicator does not update replication documents with transient states such as "triggered", "crashing", "error". This is one of the improvements and it is what allows it to run more replication jobs (since they don't write to disk as much). To observe the state of the replications created in by that document, try to do one of these things (or both):
|
OK, I've rebuilt from master, and I've shifted over to using
|
After investigation and chatting with you on IRC, I think this is because the standard JS harness is creating a custom replicator DB at After PUTting a doc into that database, waiting the requisite time, and getting a failure, I did a It also occurs to me that you're going to have to de-duplicate doc IDs from different _replicator databases so perhaps the right thing to do is to prepend the replicator DB's name to the doc ID if it's not the default Edited log:
|
Most sensible solution to me solution is to make two changes:
|
|
Previously _scheduler/docs assumed only the default _replicator db. Now these kinds of path are accepted after `_scheduler/docs`: * `/` : all docs from default _replicator db * `/_replicator` : all docs from default replicator db * `/docid` : a specific doc from the default replicator db * `/other%2f_replicator` : non-default replicator db, urlencoded * `/other/_replicator` : non-default replicator db, unencoded * `/other%2f_replicator/docid` : doc from a non-default db, urlencoded * `/other/_replicator/docid` : doc from a non-default db, db is unencoded Because `_replicator` is not a valid document ID, it's possible to unambiguously parse unescaped db paths. Issue: apache#506
Previously _scheduler/docs assumed only the default _replicator db. Now these kinds of paths are accepted after `_scheduler/docs`: * `/` : all docs from default _replicator db * `/_replicator` : all docs from default replicator db * `/docid` : a specific doc from the default replicator db * `/other%2f_replicator` : non-default replicator db, urlencoded * `/other/_replicator` : non-default replicator db, unencoded * `/other%2f_replicator/docid` : doc from a non-default db, urlencoded * `/other/_replicator/docid` : doc from a non-default db, db is unencoded Because `_replicator` is not a valid document ID, it's possible to unambiguously parse unescaped db paths. Issue: apache#506
Previously _scheduler/docs assumed only the default _replicator db. Now these kinds of paths are accepted after `_scheduler/docs`: * `/` : all docs from default _replicator db * `/_replicator` : all docs from default replicator db * `/docid` : a specific doc from the default replicator db * `/other%2f_replicator` : non-default replicator db, urlencoded * `/other/_replicator` : non-default replicator db, unencoded * `/other%2f_replicator/docid` : doc from a non-default db, urlencoded * `/other/_replicator/docid` : doc from a non-default db, db is unencoded Because `_replicator` is not a valid document ID, it's possible to unambiguously parse unescaped db paths. Issue: apache#506
Previously _scheduler/docs assumed only the default _replicator db. Now these kinds of paths are accepted after `_scheduler/docs`: * `/` : all docs from default _replicator db * `/_replicator` : all docs from default replicator db * `/docid` : a specific doc from the default replicator db * `/other%2f_replicator` : non-default replicator db, urlencoded * `/other/_replicator` : non-default replicator db, unencoded * `/other%2f_replicator/docid` : doc from a non-default db, urlencoded * `/other/_replicator/docid` : doc from a non-default db, db is unencoded Because `_replicator` is not a valid document ID, it's possible to unambiguously parse unescaped db paths. Issue: apache#506
Previously _scheduler/docs assumed only the default _replicator db. Now these kinds of paths are accepted after `_scheduler/docs`: * `/` : all docs from default _replicator db * `/_replicator` : all docs from default replicator db * `/docid` : a specific doc from the default replicator db * `/other%2f_replicator` : non-default replicator db, urlencoded * `/other/_replicator` : non-default replicator db, unencoded * `/other%2f_replicator/docid` : doc from a non-default db, urlencoded * `/other/_replicator/docid` : doc from a non-default db, db is unencoded Because `_replicator` is not a valid document ID, it's possible to unambiguously parse unescaped db paths. Issue: apache#506
Previously _scheduler/docs assumed only the default _replicator db. To provide consistency and to allow disambiguation between a db named 'db/_replicator' and the document named 'db/_replicator' in the default replicator db, access to the single document API is changed to always require the replicator db. That is `/docid` should not be `/_replicator/docid`. Now these kinds of paths are accepted after `_scheduler/docs`: * `/` : all docs from default _replicator db * `/_replicator` : all docs from default replicator db * `/other%2f_replicator` : non-default replicator db, urlencoded * `/other/_replicator` : non-default replicator db, unencoded * `/other%2f_replicator/docid` : doc from a non-default db, urlencoded * `/other/_replicator/docid` : doc from a non-default db, db is unencoded Because `_replicator` is not a valid document ID, it's possible to unambiguously parse unescaped db paths. Issue: apache#506
Previously _scheduler/docs assumed only the default _replicator db. To provide consistency and to allow disambiguation between a db named 'db/_replicator' and the document named 'db/_replicator' in the default replicator db, access to the single document API is changed to always require the replicator db. That is `/docid` should not be `/_replicator/docid`. Now these kinds of paths are accepted after `_scheduler/docs`: * `/` : all docs from default _replicator db * `/_replicator` : all docs from default replicator db * `/other%2f_replicator` : non-default replicator db, urlencoded * `/other/_replicator` : non-default replicator db, unencoded * `/other%2f_replicator/docid` : doc from a non-default db, urlencoded * `/other/_replicator/docid` : doc from a non-default db, db is unencoded Because `_replicator` is not a valid document ID, it's possible to unambiguously parse unescaped db paths. Issue: #506
Fixed by #509. |
Document these endpoints: * _scheduler/docs/{replicator_db} * _scheduler/docs/{replicator_db}/{docid} Update replicator example due to the API change in how single replicator doc info is retrieved. Issue apache/couchdb#506
Document these endpoints: * _scheduler/docs/{replicator_db} * _scheduler/docs/{replicator_db}/{docid} Update replicator example due to the API change in how single replicator doc info is retrieved. Issue apache/couchdb#506
Document these endpoints: * _scheduler/docs/{replicator_db} * _scheduler/docs/{replicator_db}/{docid} Update replicator example due to the API change in how single replicator doc info is retrieved. Issue apache/couchdb#506
Document these endpoints: * _scheduler/docs/{replicator_db} * _scheduler/docs/{replicator_db}/{docid} Update replicator example due to the API change in how single replicator doc info is retrieved. Issue apache#506
Steps to recreate
a
and put a few documents in it. Ensure a databaseb
does not exist._replicator
document of the form:_replicator/foo_error_rep
. No state has been added. I would have expected one ofcrashing
,running
orpending
.Logfile excerpt
Note the throw of
db_not_found
./cc @nickva I think this is a new bug related to the scheduling replicator work.
The text was updated successfully, but these errors were encountered: