Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-41845

Template KeyString to be allocable on either the stack or the heap

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.3.1
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • Execution Team 2019-07-15, Execution Team 2019-07-29, Execution Team 2019-08-12

      The KeyString class uses a StackAllocator to build a buffer, which is not releasable (i.e. a full copy is required). In order to mitigate performance regressions, it will be necessary to create a version of the KeyString class with a releasable buffer in cases where it is known a KeyString::Value can be produced without a copy. We should modify KeyString so that it can be templated to have a releasable buffer or not.

      Implement a release() function that is only available on a heap-allocated KeyString object, and returns an owned KeyString::Value without copying any data.

            Assignee:
            dan.solnik@mongodb.com Daniel Solnik (Inactive)
            Reporter:
            louis.williams@mongodb.com Louis Williams
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: