wohali opened a new issue #506: replication to non-existent target db never 
updates _replicator doc with state
URL: https://github.com/apache/couchdb/issues/506
 
 
   # Steps to recreate
   1. Create database `a` and put a few documents in it. Ensure a database `b` 
does not exist.
   2. Create a `_replicator` document of the form:
   ```json
   { "_id": "foo_error_rep", "source": "http://127.0.0.1:15984/a";, "target": 
"http://127.0.0.1:15984/b"; }
   ```
   3. Wait a bit and check `_replicator/foo_error_rep`. No state has been 
added. I would have expected one of `crashing`, `running` or `pending`.
   
   # Logfile excerpt
   Note the throw of `db_not_found`.
   
   ```
   [notice] 2017-05-03T21:49:42.495501Z [email protected] <0.309.0> 86f37313e7 
127.0.0.1:15984 127.0.0.1 undefined GET 
/test_suite_db_ikklhwd%2F_replicator/foo_error_rep 200 ok 50
   [notice] 2017-05-03T21:49:42.497481Z [email protected] <0.354.0> -------- 
starting new replication `b1137c827da5adb4376166374dcf79eb` at <0.1144.0> 
(`http://127.0.0.1:15984/test_suite_db_mxbhpygg/` -> 
`http://127.0.0.1:15984/nonexistent_test_db/`)
   [notice] 2017-05-03T21:49:42.497981Z [email protected] <0.355.0> -------- 
couch_replicator_scheduler: Job {"b1137c827da5adb4376166374dcf79eb",[]} started 
as <0.1144.0>
   [notice] 2017-05-03T21:49:42.547996Z [email protected] <0.309.0> 5ae0234b3c 
127.0.0.1:15984 127.0.0.1 undefined GET 
/test_suite_db_ikklhwd%2F_replicator/foo_error_rep 200 ok 2
   [notice] 2017-05-03T21:49:42.656934Z [email protected] <0.961.0> 7dd6682461 
127.0.0.1:15984 127.0.0.1 undefined GET /test_suite_db_mxbhpygg/ 200 ok 147
   [notice] 2017-05-03T21:49:42.657324Z [email protected] <0.309.0> 94c75a3e9a 
127.0.0.1:15984 127.0.0.1 undefined GET 
/test_suite_db_ikklhwd%2F_replicator/foo_error_rep 200 ok 58
   [notice] 2017-05-03T21:49:42.659778Z [email protected] <0.961.0> 286570172d 
127.0.0.1:15984 127.0.0.1 undefined GET /nonexistent_test_db/ 404 ok 1
   [error] 2017-05-03T21:49:42.660836Z [email protected] <0.1144.0> -------- 
throw:{db_not_found,<<"could not open 
http://127.0.0.1:15984/nonexistent_test_db/";>>}: Replication failed to start 
for args 
{rep,{"b1137c827da5adb4376166374dcf79eb",[]},{httpdb,"http://127.0.0.1:15984/test_suite_db_mxbhpygg/",nil,[{"Accept","application/json"},{"User-Agent","CouchDB-Replicator/2.1.0-5cad2a4"}],30000,[{socket_options,[{keepalive,true},{nodelay,false}]}],10,250,nil,20,nil,undefined},{httpdb,"http://127.0.0.1:15984/nonexistent_test_db/",nil,[{"Accept","application/json"},{"User-Agent","CouchDB-Replicator/2.1.0-5cad2a4"}],30000,[{socket_options,[{keepalive,true},{nodelay,false}]}],10,250,nil,20,nil,undefined},[{checkpoint_interval,30000},{connection_timeout,30000},{http_connections,20},{retries,10},{socket_options,[{keepalive,true},{nodelay,false}]},{use_checkpoints,true},{worker_batch_size,500},{worker_processes,4}],{user_ctx,null,[],undefined},db,nil,<<"foo_error_rep">>,<<"shards/00000000-1fffff
 ff/test_suite_db_ikklhwd/_replicator.1493848173">>,{1493,848182,496186}}: 
[{couch_replicator_api_wrap,db_open,3,[{file,"src/couch_replicator_api_wrap.erl"},{line,109}]},{couch_replicator_scheduler_job,init_state,1,[{file,"src/couch_replicator_scheduler_job.erl"},{line,568}]},{couch_replicator_scheduler_job,do_init,1,[{file,"src/couch_replicator_scheduler_job.erl"},{line,127}]},{couch_replicator_scheduler_job,handle_info,2,[{file,"src/couch_replicator_scheduler_job.erl"},{line,357}]},{gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,599}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,237}]}]
   [notice] 2017-05-03T21:49:42.709448Z [email protected] <0.309.0> 5a9498eacf 
127.0.0.1:15984 127.0.0.1 undefined GET 
/test_suite_db_ikklhwd%2F_replicator/foo_error_rep 200 ok 2
   
   ```
   
   /cc @nickva I think this is a new bug related to the scheduling replicator 
work.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to