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

[Large keys] Improvements in temp buffer management required by collatejson

    XMLWordPrintable

Details

    Description

      Collatejson encode/decode algorithms require temporary buffer to be passed by the caller. The size of these buffers should be enough to hold the intermediate data structures.

      Historically (3 * size of index key) was known to be enough but in some corner cases, this proved to be insufficient. (Note: At some places (all?), collatejson code internally uses append to avoid index out of bound error. But this will affect scan response time).

      There is a need to
      1. Introduce a better constant (may be 6), such that temporary buffer size will be enough.
      2. Introduce a setting to modify this constant to a higher value (if data set has such requirement).
      3. Reuse the resized buffer (wherever required)
      4. consolidate all large buffer resize code into one place and reuse the same across
      5. If resized buffer is not enough, retry with bigger buffer

      Attachments

        For Gerrit Dashboard: MB-31804
        # Subject Branch Project Status CR V

        Activity

          People

            varun.velamuri Varun Velamuri
            amit.kulkarni Amit Kulkarni
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty