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

Finalize API for new fail point functionality

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • 5

      This project will implement a new mechanism for defining and controlling fail points inside the WiredTiger library. The initial proposal for the interface and the functionality is described below:

      • Introduce a new method on the WT_SESSION handle, set_fault_injection(session, config) to control fault injection. The API has to take care of configuring various fault points, enable, disable or reset the whole system.
      • Consider additionally that the API has to provide the ability to:
        • Enable / Disable faults
        • Set a user given value to a fault point if required
        • Chose to always have the fault enabled or disable after first hit
        • Provide a probability of hitting the fault

      A prototype for the API as part of design work was done, which is as follows:

      fault_injection_common = [                                                                                     
          Config('enabled', 'false', r'''                                                                      
              whether enabled or not''',                                                                       
              type='boolean'),
          Config('scope', 'session', r'''                                                                      
              Whether the fault injection is limited to the current session or is applicable across all sessions.''',                                                                       
              type='string'),                                                                           
          Config('user_set_value', '0', r'''                                                                   
              value of the parameter''',                                                                       
              min='0', max='1024'),                                                                            
          Config('disable_after_hit', 'false', r'''                                                            
              disables after hitting once.''',                                                                 
              type='boolean'),                                                                                 
          Config('hit_probability', '1', r'''                                                                  
              fault hits 1 out of given times.''',                                                             
              min='1', max='32000'),                                                                           
      ]                                                                                                        
                                                                                                               
      session_set_fault_injection_config = [                                                                             
          Config('reset_all', 'false', r'''
              reset all fault points to disabled.''',                                                          
              type='boolean'),                                                                                 
          Config('fault_points', '', r'''                                                                      
              control various fault points''',                                                                 
              type='category', subconfig=[                                                                     
              Config('fault_1_val', '', r'''                                                                   
                  fault 1 blah blah.''',                                                                       
                  type='category', subconfig=fault_inj_common),                                                
              Config('fault_2_bool', '', r'''                                                                  
                  fault 2 blah blah.''',                                                                       
                  type='category', subconfig=fault_inj_common),                                                
              ]),                                                                                              
      ] 
      
      'WT_SESSION.set_fault_injection' : Method(session_set_fi_config),
      

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            deepti.hasija@mongodb.com Deepti Hasija
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: