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

Changes feed filtered by a view with seq_indexed enabled crashes on clustered interface

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • None

    Description

      When _changes feed got filtered by a view in a design doc with option "seq_indexed" set to true, it is following "fast_view" track in couch_changes:handle_changes/4, which passes the changes enumerator into view's btree instead of database btree and then filters the result by raw docs instead of #doc_info record in fast_view_filter/3. None of this is accounted in fabric's rpc and as a result attempt to filter _changes by a view with "seq_indexed" enabld lead there to following crash:

      15:19:49.066 - {"error":"error","reason":"{function_clause,nil,\n    [{couch_changes,filter,\n         [{db,<28273.395.0>,nil,<<\"1466446662476024\">>,<28273.373.0>,\n              #Ref<28273.0.4.5121>,\n              {db_header,6,12,0,\n                  {49987,{12,0,{size_info,2995,3439}},993},\n                  {50613,12,976},\n                  {422550,[],1061},\n
      
      ...skip...
      
      [{file,\"src/couch_changes.erl\"},{line,261}]},\n     {fabric_rpc,changes_enumerator,2,\n         [{file,\"src/fabric_rpc.erl\"},{line,326}]},\n     {couch_btree,stream_kv_node2,8,[{file,\"src/couch_btree.erl\"},{line,783}]},\n     {couch_btree,stream_kp_node,8,[{file,\"src/couch_btree.erl\"},{line,754}]},\n     {couch_btree,fold,4,[{file,\"src/couch_btree.erl\"},{line,220}]},\n     {couch_db,changes_since,5,[{file,\"src/couch_db.erl\"},{line,1244}]},\n     {fabric_rpc,changes,4,[{file,\"src/fabric_rpc.erl\"},{line,82}]},\n     {rexi_server,init_p,3,[{file,\"src/rexi_server.erl\"},{line,139}]}]}"}
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              eiri Eric Avdey
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: