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

Refactor ViewsForDatabase to convert public class variables to private

    • Type: Icon: Task Task
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Storage Execution
    • Execution Team 2023-06-12

      In SERVER-57250 we are converting the simple ViewsForDatabase struct to a more complex class. This is a great improvement, but there are still some more things we want to do. Copied from review comments:

      1)

      "I really like separating out ViewsForDatabase into its own thing, but the public variables here bother me. We don't normally have public class variables – only in simple structs, and this type warrants a class with all the other logic. And it's really tricky looking at the .cpp file and discerning that these are class variables without the usual underscore prefix signal – e.g. _viewMap, _ignoreExternChange, etc.

      Is there a way we could make these private and add helper functions for access? Like from a brief look at the usage, looks like a clear() function and some getters at least."

      2)

      "Could we rename 'durable' to 'durableViewCatalog' while we're here?

      Seeing durable->iterate(..) in the .cpp file made me go "huh?" Named like a boolean."

            Assignee:
            gregory.noma@mongodb.com Gregory Noma
            Reporter:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: