Enable field introspection in WiredTiger

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: APIs, Test Python
    • None
    • Storage Engines, Storage Engines - Persistence
    • None
    • None

      To improve testing turn around, and make higher level functionality (difficult to unit test functionality) easier to test from python and other tests, we should add field introspection to WiredTiger. 

      This would allow us to peek inside WT_SESSION_IMPL and WT_CONNECTION_IMPL without having to do the following:

      • Add a new statistic.
      • Include "wt_internal.h", a bad pattern used by some C & C++ tests.
      • Add a new verbose log message, or metadata field to aid in testability.

      Sometimes because this feature is not available changes forego testing due to lack of testability, although this is a uncommon.

      To implement this the following should be done:

      1. Add two new debug API's to the session and connection, they should compile only under HAVE_DIAGNOSTIC and should also ensure that RELEASE is not set. We do not want to leak these apis into release builds.
      2. Add a new dist scripts file, introspect_fields.txt which is read by a new python script which autogenerates introspection code.

      Then a user can simply add whatever field they want to introspect to the list of fields in the text file, run ./s_all and be able to get the value of the field, as a string, via conn->get_field("abc.blah"). 

      The field name should allow for sub-struct lookup via the "." delimiter. 

      Scope:

      • Implement field introspection
      • Demonstrate that it works via a python test

            Assignee:
            Luke Pearson
            Reporter:
            Luke Pearson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: