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

Implement JSON encoded strings to be produced by the WT_EVENT_HANDLER API

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • WT10.0.1, 5.2.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • 8
    • Storage - Ra 2021-11-15, Storage - Ra 2021-11-29

      Currently messages produced by the event handler interface are formatted as “flat”-style strings, prepended with a list of comma-separated attributes. As a means to improve the structure of our event handler messages  we will update the event handler to optionally allow the formatting of messages as JSON-encoded strings. This introduces a structured, reliable and easy to parse message format that can be flexibly extended to expose new metadata attributes. An example converting between flat-style strings to JSON-encoded strings:

       

      Style Example
      Flat String Version [1633567623:999634][4202:0x7f843dae3740], test_verbose.test_verbose.test_long_running, WT_CONNECTION.close: [WT_VERB_EVICTSERVER] waking, bytes inuse <= max (0MB <= 100MB)
      JSON Version "ts_sec": "1633567623", "ts_usec": "999634", "thread": "4202:0x7f843dae3740", "err_prefix": "test_verbose.test_verbose.test_long_running", "session_name": "WT_CONNECTION.close", "category": "WT_VERB_EVICTSERVER", "category_id": 5, "verbose_level": "WT_DEBUG_1", "verbose_level_id": "1", "msg": "waking, bytes inuse <= max (0MB <= 100MB)"
      Note: omitted wrapping curly brackets due to jira formatting issues

       

      Definition of Done:

      • Introduce connection configuration option to enable the JSON-encoded strings - 'verbose_json'. In absence of the configuration option, WiredTiger will default to the legacy flat-style strings.
      • Expand the event handler implementation (eventv) to format message strings into JSON-encoded strings (when the configuration option is enabled).
        • Encode the JSON message to be inline with the above schema, reformatting the attributes appended by 'eventv' as JSON-fields (e.g. timestamp, thread name, session name etc.)
      • The legacy flat-string format should remain un-impacted i.e. the format remains unchanged.

       

      Documentation of this functionality will be done in WT-8261.

            Assignee:
            alison.felizzi@mongodb.com Alison Felizzi (Inactive)
            Reporter:
            deepti.hasija@mongodb.com Deepti Hasija
            Etienne Petrel
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: