Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-6533

couchstore_save_document should update DocInfo

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Minor
    • feature-backlog
    • None
    • storage-engine
    • Security Level: Public
    • None

    Description

      couchstore_save_document updates the db_seq field of the input DocInfo to reflect the assigned sequence number. But it doesn't update other fields that are affected by the save: bp, size and deleted. This means that after the call the DocInfo isn't an accurate reflection of the document state. In particular, you can't later use the same DocInfo with couchstore_open_doc_with_docinfo to efficiently retrieve the data — you'll just get an error, because the 'bp' field isn't set.

      Internally, CouchStore does update all the fields of the DocInfo, but it does it to a copy of the struct, not the original (see the function add_doc_to_update_list). I think we just need to propagate the changed struct into the original the caller passes in.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            jens Jens Alfke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty