)]}'
{
  "commit": "7ad8061f44f230e8184ee5dfc1e572d7b9de3d53",
  "tree": "fde0b04bdac96cbf3ac9ef20b427176c0d14b7b1",
  "parents": [
    "7e040afe30b317e998d92db015a85c7287a05536"
  ],
  "author": {
    "name": "Martin Fick",
    "email": "martin.fick@linaro.org",
    "time": "Mon Aug 28 11:41:40 2023 -0600"
  },
  "committer": {
    "name": "Martin Fick",
    "email": "martin.fick@linaro.org",
    "time": "Mon Aug 28 17:18:51 2023 -0600"
  },
  "message": "Avoid streaming check on dropped events\n\nSince dropped events don\u0027t need to be sent out to streamListeners, avoid\nthe extra overhead of checking to see if they need to be fired to the\nstreamListeners. This helps reduce the load on the event system as each\nupdate check at a minimum requires reading the on disk \"head\" value. A\nside effect is also that these events will also not trigger pending\nevents from other primaries to fire, which likely results in significant\nextra and not very fruitful polling (see below).\n\nAssuming that events are distributed approximately evenly over all\nprimaries, then for every event on one primary, there should be\napproximately one other event on every other primary. So for each event\nwhich gets stored, there is a chance that 50% of the other primaries\nhave also stored an event still pending on the current primary. In these\ncases, flushing pending events is very likely to improve event firing\nlatency over polling, and the more primaries there are, the more\nvaluable this is as there will be more pending events. This means that\nthere should on average always be one pending when there are 3\nprimaries. However, when it comes to dropped events, this logic doesn\u0027t\nhold. If one primary has a dropped event, so likely will the others, but\nthose dropped events on the other primaries do no affect the current\nprimary since they do not require firing from the current primary! Thus\nthere is a low chance that this extra polling will be useful. This\nwasted polling effort was amplified by the fact that events configured\nto be dropped likely have a higher frequency then most of the events\nwhich are not dropped.\n\nRelease-Notes: Dropped events now result in less IO, and won\u0027t fire pending events from other primaries\nChange-Id: Ic87a53924dbdf4ce1b26450a5fb5fb46308c9a20\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "2791a19d9a26c44cfeea8b8605ca1066ab5778fd",
      "old_mode": 33188,
      "old_path": "src/main/java/com/googlesource/gerrit/plugins/events/FileSystemEventBroker.java",
      "new_id": "e8bf937f27dd7b5685942dcc5c3e40a2dc8adc25",
      "new_mode": 33188,
      "new_path": "src/main/java/com/googlesource/gerrit/plugins/events/FileSystemEventBroker.java"
    }
  ]
}
