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

View binding to a document

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • None

    Description

      Would like to request for a feature of creating a design document to be associated with only one document.
      Currently the view function function(doc) it iterates over all documents in the database and one is required to check for either _id or create a type and check for it in the view.
      In my use of couchdb i have lot of documents with large size and so running of a view takes one and in some case couch crashes with following

      [Tue, 25 Jun 2013 10:23:08 GMT] [error] [<0.24612.16>] {error_report,<0.34.0>,
      {<0.24612.16>,crash_report,
      [[{initial_call,
      {couch_view_group,init,['Argument__1']}},

      {pid,<0.24612.16>}

      ,

      {registered_name,[]},
      {error_info,
      {exit,
      {os_process_error,{exit_status,0}},
      [{gen_server,terminate,6,
      [{file,"gen_server.erl"},{line,737}]},
      {proc_lib,init_p_do_apply,3,
      [{file,"proc_lib.erl"},{line,227}]}]}},
      {ancestors,[<0.24611.16>]},
      {messages,[]},
      {links,[<0.24613.16>,<0.101.0>]},
      {dictionary,[]},
      {trap_exit,true},
      {status,running},
      {heap_size,1597},
      {stack_size,24},
      {reductions,438}],
      []]}}
      [Tue, 25 Jun 2013 10:23:08 GMT] [error] [<0.24613.16>] ** Generic server <0.24613.16> terminating
      ** Last message in was {'EXIT',<0.24612.16>,
      {os_process_error,{exit_status,0}}}
      ** When Server state == {file,{file_descriptor,prim_file,{#Port<0.5462>,512}},
      4192}
      ** Reason for termination ==
      ** {os_process_error,{exit_status,0}}

      [Tue, 25 Jun 2013 10:23:08 GMT] [error] [<0.24613.16>] {error_report,<0.34.0>,
      {<0.24613.16>,crash_report,
      [[{initial_call,{couch_file,init,['Argument__1']}},
      {pid,<0.24613.16>},
      {registered_name,[]}

      ,
      {error_info,
      {exit,
      {os_process_error,{exit_status,0}},
      [{gen_server,terminate,6,
      [

      {file,"gen_server.erl"}

      ,

      {line,737}

      ]},
      {proc_lib,init_p_do_apply,3,
      [

      {file,"proc_lib.erl"}

      ,

      {line,227}

      ]}]}},

      {ancestors,[<0.24612.16>,<0.24611.16>]}

      ,
      {messages,[

      {'EXIT',<0.24615.16>,shutdown}

      ]},

      {links,[]}

      ,

      {dictionary,[]}

      ,

      {trap_exit,true}

      ,

      {status,running}

      ,

      {heap_size,610}

      ,

      {stack_size,24}

      ,

      {reductions,1093}

      ],
      []]}}
      [Tue, 25 Jun 2013 10:23:08 GMT] [error] [<0.29460.2>] Uncaught server error: {os_process_error,
      {exit_status,0}}

      Now i agree that my document may be too big, and i know which one cause the problem it would of immense help if instead of going through each document in the view function i can pass the doc._id to the view function or the view is associated somehow with a document and runs for only that document.

      That will solve one of my issues in terms of view performance and memory requirements in the case that is a large document but i have no view associated with it and i have smaller docs that contain extracted content of the large doc on which i want to run views then if the view is associated with a document it will never load the large document.

      Attachments

        Activity

          People

            Unassigned Unassigned
            garytitus Gary Titus
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: