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

Refactor bucket_catalog_internal::insert() into 3 different functions

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Execution Team 2024-01-22, Execution Team 2024-02-05

      bucket_catalog_internal::insert has a number of different branching paths that depend on the combination of two of its parameters - AllowBucketCreation and ReopeningContext. There are three different combination of values that these parameters can take that get used in the insert writepath - with AllowBucketCreation set to kNo and no ReopeningContext, with AllowBucketCreation set to kYes and no ReopeningContext, and AllowBucketCreation set to kYes and a non-null Reopening Context. As it is, the reuse of the same function in these different contexts makes the function difficult to reason about, and in particular it became difficult to reason about changing behavior for it in the context of SERVER-79480

      This ticket will split this function into three different functions, which should make each of the cases, and the function, easier to reason about and change.

            Assignee:
            damian.wasilewicz@mongodb.com Damian Wasilewicz
            Reporter:
            damian.wasilewicz@mongodb.com Damian Wasilewicz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: