Make SBE OwnedValueAccessor use Value RAII types

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      OwnedValueAccessor relies on raw, manually annotated 'owned' flags to be passed around, e.g. here:

       

          void reset(TypeTags tag, Value val) {
              reset(true, tag, val);
          }
          void reset(bool owned, TypeTags tag, Value val) override {
              release();
              _tag = tag;
              _val = val;
              _owned = owned;
          } 

      This task is to
      (1) Introduce overloads of reset() which take an TagValueOwned, TagValueMaybeOwned and TagValueView
      (2) Rename the existing reset() interfaces to reset_raw()
      (3) Remove as many reset_raw() calls as possible, replacing them with reset()

      (3) will likely be a very large change that we'll have to split across multiple tickets.

      If feasible, we should eliminate the reset(TypeTags, Value) overload completely and replace it with either reset_raw(true, tag, val), or, preferably, one of the new reset() overloads which takes an RAII type.

            Assignee:
            Unassigned
            Reporter:
            Ian Boros
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: