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

Enhance flags.py to generate the flags variable declaration

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • 5
    • StorEng - Defined Pipeline

      Summary
      What is the problem or use case, what are we trying to achieve?
      The idea behind this ticket is to enhance flags.py to control the flag variable declaration of each flag. This will allow us to correctly use flags in the case that the size needs to change depending on the number of flags. I have attached a diff file made by keith.bostic@mongodb.com

      Keith Bostic:

      The fundamental problem here is that flags.py doesn't control the variable declaration, and so we rely on engineers to ensure the STOP line information matches the required number of flags, which is error prone.
      
      I'd recommend changing it so flags.py owns the variable declaration. We could change the START line to be something like
      
      AUTOMATIC FLAG VALUE GENERATION START timing_stress_flags=0
      with the variable name and start value, and remove the size part of the STOP line entirely. That simplifies the work in the include files, flags.py can generate a correct variable declaration, and engineers don't have to do anything other than list the flags and choose a variable name.
      
      I've attached a flags.py that does this to this comment -- it's actually quite a bit simpler than before. I've only smoke-tested it, but it seems to work.
      
      Obviously, this is a bigger change, if you agree with the direction, I'd suggest sitting down with @agorrod and reviewing it with him.
      

      https://github.com/wiredtiger/wiredtiger/pull/7991

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            jie.chen@mongodb.com Jie Chen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: