Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-68739

Add WiredTiger session statistic without affecting slow op statistics

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.0.15, 6.2.0-rc2, 6.3.0-rc0, 6.0.5
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • v6.2, v6.0, v5.0
    • Execution Team 2022-10-31, Execution Team 2022-11-14, Execution Team 2022-11-28
    • 40

      WiredTiger has some statistics that are maintained for each session. They are tightly coupled to the storage section of the slow operation statistics in the server. This prevents adding session statistics in WiredTiger without addressing that statistic in the server. Here is an example from WT-8848:

      WT-8848 wants to add a new statistic, bytes dirtied by a transaction. But doing so trips the invariant in the server as there is a hard coded map between server's expectation and the sessions statistics.

      Also, fetching the statistics causes all the stats to be reset to 0. This is okay when there is one operation per transaction. In the case of MongoDB multi-doc transactions, there could be several WiredTiger operations at the end of which these stats get reset to 0. The server accumulates these stats for the purpose of logging. If we were to decouple the slow operation stats known to the server from the WiredTiger's session statistics, we will have to make sure there is a workaround for not mistakenly resetting all the statistics to zero. So, in this case, the dirtied bytes by the transaction should not be reset to zero until the end of the multi-doc transaction.

            Assignee:
            yujin.kang@mongodb.com Yujin Kang Park
            Reporter:
            sulabh.mahajan@mongodb.com Sulabh Mahajan
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: