Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-5337

Explore using enum pattern in WT

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:

      I saw in a lot of places in the code base, we switch based on the page type or table type and perform specific operations. I think enum pattern can help us remove most of these switch statements.

      What we need to do is to create enum for page and table and define function pointers in the enum.

      In this way, we can decide what enum we need to pass at the top level and the downstream code only need to call the functions defined in the enum, limiting the switch only at the top level.

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            chenhao.qu@mongodb.com Chenhao Qu
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: