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

Rename VersionContext::getDecoration() to VersionContextDecoration::get()

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Trivial - P5 Trivial - P5
    • None
    • Affects Version/s: 8.2.0-rc0
    • Component/s: None
    • None
    • Catalog and Routing
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The VersionContext type is currently declared in a single header file (src/mongo/db/version_context.h) but the definitions are split between two source files (src/mongo/db/version_context.cpp) and src/mongo/db/version_context_decoration.cpp).

      This split is due to the need to use VersionContext from within server_base (where OperationContext is not available), yet still allow implementing methods such as VersionContext::getDecoration(OperationContext*).

      An alternative design would be to move the methods that receive an OperationContext parameter to a new VersionContextDecoration class. This would allow a 1-to-1 correspondence between header and source files, potentially preventing confusion and linking problems.

            Assignee:
            Unassigned Unassigned
            Reporter:
            joan.bruguera-mico@mongodb.com Joan Bruguera Micó
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              None
              None
              None
              None