Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-1427

Replication task not cancelled when documen was deleted from _replicator db

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Cannot Reproduce
    • 1.1.1
    • None
    • Futon, Replication
    • Windows 7 / 64bit

    Description

      Note: I did all of the following via the Futon interface on my local development PC:

      1. I added a doc with continuous=true and a user-defined ID to _replicator and created a new, empty target database.
      2. I realized shortly thereafter that my doc had an error.
      2. I deleted the doc (after first being unable to edit/correct it) and deleted the target database
      3. I repaired and recreated the doc, using the same ID as in step #1, and I created a new, empty target database
      4. I probably did this a total of 4 times before I got the doc right (it was my first replication doc working with a filter)
      5. 10 minutes after I'd deleted the erratic docs, Couch was still trying to run the replications
      6. I deleted the correct doc, which had sparked a successful replication
      7. Half an hour later, Couch was still trying to run all of the unsuccessful replications, logging errors at the rate of around 20K lines per minute
      8. I finally restarted Couch - after it came back up, it no longer tried to run the replications

      Following are a few representative log entries:

      [Fri, 02 Mar 2012 18:10:54 GMT] [info] [<0.13674.364>] Document `example_john` triggered replication `10654d1361b111fb7c7f53b05f15mastercb+continuous`
      [Fri, 02 Mar 2012 18:10:54 GMT] [info] [<0.13626.364>] starting new replication "10654d1361b111fb7c7f53b05f15mastercb+continuous" at <0.13674.364>
      [Fri, 02 Mar 2012 18:10:55 GMT] [error] [<0.13676.364>] OS Process Error <0.13683.364> ::

      {<<"unnamed_error">>, <<"(new String(\"Please provide a query parameter `name`.\"))">>}

      [Fri, 02 Mar 2012 18:10:55 GMT] [error] [<0.13675.364>] changes_loop died with reason {{nocatch,
      {<<"unnamed_error">>,
      <<"(new String(\"Please provide a query parameter `name`.\"))">>}},
      [

      {couch_os_process, prompt,2}

      ,

      {couch_query_servers, with_ddoc_proc,2}

      ,

      {couch_query_servers, filter_docs,5}

      ,

      {couch_changes, '-os_filter_fun/4-fun-1-', 6}

      ,

      {couch_changes, changes_enumerator,2}

      ,

      {couch_btree, stream_kv_node2,8}

      ,

      {couch_btree, stream_kp_node,7}

      ,

      {couch_btree, stream_kp_node,8}

      ]}
      [Fri, 02 Mar 2012 18:10:55 GMT] [error] [emulator] Error in process <0.13676.364> with exit value: nocatch,{<<13 bytes>>,<<64 bytes>>,[

      {couch_os_process,prompt,2},{couch_query_servers,with_ddoc_proc,2},{couch_query_servers,filter_docs,5},{couch_changes,'-os_filter_fun/4-fun-1-',6},{couch_changes,changes_enumerator,2},{couch_btree,stream_kv_node2...


      [Fri, 02 Mar 2012 18:10:55 GMT] [error] [<0.13675.364>] ** Generic server <0.13675.364> terminating
      ** Last message in was {'EXIT',<0.13676.364>,
      {{nocatch,
      {<<"unnamed_error">>,
      <<"(new String(\"Please provide a query parameter `name`.\"))">>}},
      [{couch_os_process,prompt,2}

      ,

      {couch_query_servers,with_ddoc_proc,2}

      ,

      {couch_query_servers,filter_docs,5}

      ,

      {couch_changes,'-os_filter_fun/4-fun-1-',6}

      ,

      {couch_changes,changes_enumerator,2}

      ,

      {couch_btree,stream_kv_node2,8}

      ,

      {couch_btree,stream_kp_node,7}

      ,

      {couch_btree,stream_kp_node,8}

      ]}}

        • When Server state == {state,nil,<0.13676.364>,
          [<0.13674.364>,
          {db,<0.20529.5>,<0.20530.5>,nil,
          <<"1329382070052301">>,<0.2796.299>,
          <0.2798.299>,
          {db_header,5,1729,0,
          {27024847,{1108,31}},
          {27026699,1139},
          {27032365,[]},
          0,nil,9306209,1000},
          1729,
          {btree,<0.2796.299>,
          {27024847,{1108,31}},
          #Fun<couch_db_updater.10.19222179>,
          #Fun<couch_db_updater.11.21515767>,
          #Fun<couch_btree.5.112258129>,
          #Fun<couch_db_updater.12.93888648>},
          {btree,<0.2796.299>,
          {27026699,1139}

          ,
          #Fun<couch_db_updater.13.40165027>,
          #Fun<couch_db_updater.14.82810239>,
          #Fun<couch_btree.5.112258129>,
          #Fun<couch_db_updater.15.104121193>},

          Unknown macro: {btree,<0.2796.299>, {27032365,[]},
          #Fun<couch_btree.0.23070627>,
          #Fun<couch_btree.1.117278773>,
          #Fun<couch_btree.2.112258129>,nil},
          1729,<<"master">>,"../var/lib/couchdb/master.couch",
          [],
          [{<<"admins">>,
          {[{<<"names">>, [<<"woot">>,<<"woot@example.com">>]},
          {<<"roles">>, [<<"example-owner">>, <<"example-admin">>]}]}},
          {<<"readers">>,
          {[{<<"names">>,[]},{<<"roles">>,[]}]}}],
          9306209,
          {user_ctx,<<"john@example.com">>,[],undefined},
          nil,1000,
          [before_header,after_header,on_file_open],
          false},
          0,
          [{<<"_id">>,<<"example_john">>},
          {<<"_rev">>, <<"1-41945c5ce54088eccf827f4c69d00739">>},
          {<<"source">>,<<"master">>},
          {<<"target">>,<<"child_john-doe">>},
          {<<"filter">>,<<"test/john">>},
          {<<"continuous">>,true},
          {<<"user_ctx">>,
          {[{<<"name">>,<<"john@example.com">>}]}},
          {<<"query">>,
          {[{<<"name">>, <<"john doe">>}]}}]],
          undefined,nil,nil,false,0,<<>>,
          {<0.13678.364>,#Ref<0.0.64.5975>},
          {[],[]},
          nil}
          ** Reason for termination ==
          ** changes_loop_died

          [Fri, 02 Mar 2012 18:10:55 GMT] [error] [<0.13675.364>] {error_report,<0.34.0>,
          {<0.13675.364>,crash_report,
          [[{initial_call,
          {couch_rep_changes_feed,init,
          ['Argument__1']}},
          {pid,<0.13675.364>},
          {registered_name,[]},
          {error_info,
          {exit,changes_loop_died,
          [{gen_server,terminate,6},
          {proc_lib,init_p_do_apply,3}]}},
          {ancestors, [<0.13674.364>,couch_rep_sup, couch_primary_services,couch_server_sup, <0.35.0>]},
          {messages,[]},
          {links,[<0.13674.364>]},
          {dictionary,[]},
          {trap_exit,true},
          {status,running},
          {heap_size,1597},
          {stack_size,24},
          {reductions,2157}],
          []]}}
          [Fri, 02 Mar 2012 18:10:55 GMT] [error] [<0.13677.364>] ** Generic server <0.13677.364> terminating
          ** Last message in was {'EXIT',<0.13678.364>,
          {changes_loop_died,
          {gen_server,call, [<0.13675.364>,next_changes,infinity]}}}
          ** When Server state == {state,nil,nil,<0.13674.364>,false,0,
          {<0.13680.364>,#Ref<0.0.64.5977>},
          {[],[]},
          0,0,0}
          ** Reason for termination ==
          ** {changes_loop_died,{gen_server,call,[<0.13675.364>,next_changes,infinity]}}

          [Fri, 02 Mar 2012 18:10:55 GMT] [error] [<0.13677.364>] {error_report,<0.34.0>,
          {<0.13677.364>,crash_report,
          [[{initial_call,
          {couch_rep_missing_revs,init,['Argument__1']}},
          {pid,<0.13677.364>},
          {registered_name,[]},
          {error_info,
          {exit,
          {changes_loop_died,
          {gen_server,call,
          [<0.13675.364>,next_changes,infinity]}},
          [{gen_server,terminate,6},
          {proc_lib,init_p_do_apply,3}]}},
          {ancestors, [<0.13674.364>,couch_rep_sup, couch_primary_services,couch_server_sup, <0.35.0>]},
          {messages,[]},
          {links,[<0.13674.364>]},
          {dictionary,[]},
          {trap_exit,true},
          {status,running},
          {heap_size,233},
          {stack_size,24},
          {reductions,141}],
          []]}}
          [Fri, 02 Mar 2012 18:10:55 GMT] [error] [<0.13679.364>] ** Generic server <0.13679.364> terminating
          ** Last message in was {'EXIT',<0.13680.364>,
          {{changes_loop_died,
          {gen_server,call,
          [<0.13675.364>,next_changes,infinity]}},
          {gen_server,call, [<0.13677.364>,next_missing_revs,infinity]}}}
          ** When Server state == {state,<0.13674.364>,
          {db,<0.20529.5>,<0.20530.5>,nil,
          <<"1329382070052301">>,<0.2796.299>,
          <0.2798.299>,
          {db_header,5,1729,0,
          {27024847,{1108,31}},
          {27026699,1139},
          {27032365,[]}, 0,nil,9306209,1000}

          ,
          1729,
          {btree,<0.2796.299>,
          {27024847,{1108,31}},
          #Fun<couch_db_updater.10.19222179>,
          #Fun<couch_db_updater.11.21515767>,
          #Fun<couch_btree.5.112258129>,
          #Fun<couch_db_updater.12.93888648>},

          Unknown macro: {btree,<0.2796.299>, {27026699,1139},
          #Fun<couch_db_updater.13.40165027>,
          #Fun<couch_db_updater.14.82810239>,
          #Fun<couch_btree.5.112258129>,
          #Fun<couch_db_updater.15.104121193>},
          {btree,<0.2796.299>,
          {27032365,[]},
          #Fun<couch_btree.0.23070627>,
          #Fun<couch_btree.1.117278773>,
          #Fun<couch_btree.2.112258129>,nil},
          1729,<<"master">>,"../var/lib/couchdb/master.couch",
          [],
          [{<<"admins">>,
          {[{<<"names">>, [<<"woot">>,<<"woot@example.com">>]},
          {<<"roles">>, [<<"example-owner">>,<<"example-admin">>]}]}},
          {<<"readers">>,
          {[{<<"names">>,[]},{<<"roles">>,[]}]}}],
          9306209,
          {user_ctx,<<"john@example.com">>,[],undefined},
          nil,1000,
          [before_header,after_header,on_file_open],
          false},
          <0.13677.364>,<0.13680.364>,[],0,
          {[],[]},
          {<0.13681.364>,#Ref<0.0.64.5985>},
          false,0,nil,[],[]}
          ** Reason for termination ==
          ** {function_clause,
          [{couch_rep_reader,handle_info,
          [{'EXIT',<0.13680.364>,
          {{changes_loop_died,
          {gen_server,call,[<0.13675.364>,next_changes,infinity]}},
          {gen_server,call, [<0.13677.364>,next_missing_revs,infinity]}}},
          {state,<0.13674.364>,
          {db,<0.20529.5>,<0.20530.5>,nil,<<"1329382070052301">>,
          <0.2796.299>,<0.2798.299>,
          {db_header,5,1729,0,
          {27024847,{1108,31}},
          {27026699,1139}, {27032365,[]},
          0,nil,9306209,1000},
          1729,
          {btree,<0.2796.299>,
          {27024847,{1108,31}},
          #Fun<couch_db_updater.10.19222179>,
          #Fun<couch_db_updater.11.21515767>,
          #Fun<couch_btree.5.112258129>,
          #Fun<couch_db_updater.12.93888648>},
          {btree,<0.2796.299>,
          {27026699,1139},
          #Fun<couch_db_updater.13.40165027>,
          #Fun<couch_db_updater.14.82810239>,
          #Fun<couch_btree.5.112258129>,
          #Fun<couch_db_updater.15.104121193>},
          {btree,<0.2796.299>,
          {27032365,[]}, #Fun<couch_btree.0.23070627>, #Fun<couch_btree.1.117278773>, #Fun<couch_btree.2.112258129>,nil}

          ,
          1729,<<"master">>,"../var/lib/couchdb/master.couch",[],
          [{<<"admins">>,
          {[

          {<<"names">>,[<<"woot">>,<<"woot@example.com">>]}

          ,

          {<<"roles">>, [<<"example-owner">>,<<"example-admin">>]}

          ]}},
          {<<"readers">>,{[

          {<<"names">>,[]},{<<"roles">>,[]}]}}],
          9306209,
          {user_ctx,<<"john@example.com">>,[],undefined},
          nil,1000,
          [before_header,after_header,on_file_open],
          false},
          <0.13677.364>,<0.13680.364>,[],0,
          {[],[]},
          {<0.13681.364>,#Ref<0.0.64.5985>},
          false,0,nil,[],[]}]},
          {gen_server,handle_msg,5},
          {proc_lib,init_p_do_apply,3}]}

          [Fri, 02 Mar 2012 18:10:55 GMT] [error] [<0.13679.364>] {error_report,<0.34.0>,
          {<0.13679.364>,crash_report,
          [[{initial_call,
          {couch_rep_reader,init,['Argument__1']}},
          {pid,<0.13679.364>},
          {registered_name,[]},
          {error_info,
          {exit,
          {function_clause,
          [{couch_rep_reader,handle_info,
          [{'EXIT',<0.13680.364>,
          {{changes_loop_died,
          {gen_server,call,
          [<0.13675.364>,next_changes,infinity]}},
          {gen_server,call, [<0.13677.364>,next_missing_revs, infinity]}}},
          {state,<0.13674.364>,
          {db,<0.20529.5>,<0.20530.5>,nil,
          <<"1329382070052301">>,<0.2796.299>,
          <0.2798.299>,
          {db_header,5,1729,0,
          {27024847,{1108,31}},
          {27026699,1139},
          {27032365,[]},
          0,nil,9306209,1000},
          1729,
          {btree,<0.2796.299>,
          {27024847,{1108,31}},
          #Fun<couch_db_updater.10.19222179>,
          #Fun<couch_db_updater.11.21515767>,
          #Fun<couch_btree.5.112258129>,
          #Fun<couch_db_updater.12.93888648>},
          {btree,<0.2796.299>,
          {27026699,1139},
          #Fun<couch_db_updater.13.40165027>,
          #Fun<couch_db_updater.14.82810239>,
          #Fun<couch_btree.5.112258129>,
          #Fun<couch_db_updater.15.104121193>},
          {btree,<0.2796.299>,
          {27032365,[]},
          #Fun<couch_btree.0.23070627>,
          #Fun<couch_btree.1.117278773>,
          #Fun<couch_btree.2.112258129>,nil},
          1729,<<"master">>,
          "../var/lib/couchdb/master.couch",[],
          [{<<"admins">>,
          {[{<<"names">>, [<<"woot">>,<<"woot@example.com">>]},
          {<<"roles">>, [<<"example-owner">>, <<"example-admin">>]}]}},
          {<<"readers">>,
          {[{<<"names">>,[]}

          ,

          {<<"roles">>,[]}

          ]}}],
          9306209,

          {user_ctx,<<"john@example.com">>,[], undefined}

          ,
          nil,1000,
          [before_header,after_header,on_file_open],
          false},
          <0.13677.364>,<0.13680.364>,[],0,

          {[],[]}

          ,

          {<0.13681.364>,#Ref<0.0.64.5985>}

          ,
          false,0,nil,[],[]}]},

          {gen_server,handle_msg,5}

          ,

          {proc_lib,init_p_do_apply,3}]},
          [{gen_server,terminate,6},
          {proc_lib,init_p_do_apply,3}

          ]}},

          {ancestors, [<0.13674.364>,couch_rep_sup, couch_primary_services,couch_server_sup, <0.35.0>]}

          ,

          {messages,[]}

          ,

          {links,[<0.13674.364>]}

          ,

          {dictionary,[]}

          ,

          {trap_exit,true}

          ,

          {status,running}

          ,

          {heap_size,987}

          ,

          {stack_size,24}

          ,

          {reductions,182}

          ],
          []]}}
          [Fri, 02 Mar 2012 18:10:55 GMT] [error] [<0.101.0>] Error in replication `10654d1361b111fb7c7f53b05f15mastercb+continuous` (triggered by document `example_john`): changes_loop_died
          Restarting replication in 5 seconds.

      Attachments

        Activity

          People

            Unassigned Unassigned
            texinwien Kurt Milam
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: