-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
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.