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

X-Couch-Full-Commit is not mentioned in _bulk_docs API

    XMLWordPrintableJSON

Details

    • Documentation
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.5.0
    • Documentation
    • None

    Description

      The header field X-Couch-Full-Commit is not documented, but it's used. See the code below and the documentation:

      http://docs.couchdb.org/en/latest/api/database.html#post-db-bulk-docs

      db_req(#httpd

      {method='POST',path_parts=[_,<<"_bulk_docs">>]}

      =Req, Db) ->
      couch_stats_collector:increment(

      {httpd, bulk_requests}

      ),
      couch_httpd:validate_ctype(Req, "application/json"),

      {JsonProps}

      = couch_httpd:json_body_obj(Req),
      case couch_util:get_value(<<"docs">>, JsonProps) of
      undefined ->
      send_error(Req, 400, <<"bad_request">>, <<"Missing JSON list of 'docs'">>);
      DocsArray ->
      case couch_httpd:header_value(Req, "X-Couch-Full-Commit") of
      "true" ->
      Options = [full_commit];
      "false" ->
      Options = [delay_commit];
      _ ->
      Options = []
      end,

      Attachments

        Activity

          People

            kxepal Alexander Shorin
            dedalo Filippo Fadda
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: