)]}'
{
  "commit": "5b481ff4d305457431a9744a3d08e9ed426ea153",
  "tree": "bb033e7558b139933e109cc873fa65ad8ae4d6eb",
  "parents": [
    "5e5cb69c5cb55217bb54a5d35dd6d539d86c9c6e"
  ],
  "author": {
    "name": "Dariusz Luksza",
    "email": "dariusz.luksza@gmail.com",
    "time": "Fri Feb 16 16:41:11 2024 +0000"
  },
  "committer": {
    "name": "Dariusz Luksza",
    "email": "dariusz.luksza@gmail.com",
    "time": "Mon Feb 19 09:56:49 2024 +0000"
  },
  "message": "Add combinedRefsSha1 to metrics\n\nExpose new metric providing a \"combined refs SHA-1\", which could be\nused to ensure eventual consistency of repository refs.\n\nIt\u0027s based on the `Sha1AllRefs`[1] Groovy script, which will iterate\nover all repository refs and combine them into a single SHA-1. Then the\nresulting SHA-1 will be truncated to an integer value so that it can\nbe included in metrics.\n\nExposing this metric should enable Gerrit admins to detect potential\ninconsistencies between nodes. All git repositories are **eventually\nconsistent** which means that detecting different values for combined\nrefs SHA-1 is **NOT** equivalent to data inconsistency. But not\nreporting a consistent state (when the combined refs SHA-1 across nodes\nis the same) for a _reasonable time_ should raise an eyebrow and lead to\nan investigation if any of the replication events were lost.\n\nThe _reasonable time_ will differ from repository to repository, for\nsome it may be 2 hours, and for others 24 hours. Meaning, that within\nthat time the repositories should be consistent at least once. It\u0027s on\nthe Gerrit admin to find the time window that works best for their\nrepositories.\n\n[1]\nhttps://gerrit.googlesource.com/plugins/scripts/+/refs/heads/master/multi-primary/localrefdb.groovy#142\n\nBug: Issue 324975825\nChange-Id: I2e4dbea0892776069dea371803653b7dd239f7f8\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "10c116ad5365462f4640a7131fc774dc2414e715",
      "old_mode": 33188,
      "old_path": "src/main/java/com/googlesource/gerrit/plugins/gitrepometrics/Module.java",
      "new_id": "6bbf8f7a64a7e910630eedb76166f2b5dc8f2dcd",
      "new_mode": 33188,
      "new_path": "src/main/java/com/googlesource/gerrit/plugins/gitrepometrics/Module.java"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "96e83505b5ae4328ac298febc87e2db7a9f806bc",
      "new_mode": 33188,
      "new_path": "src/main/java/com/googlesource/gerrit/plugins/gitrepometrics/collectors/GitRefsMetricsCollector.java"
    },
    {
      "type": "modify",
      "old_id": "acda59495899b49a13e682bc5b460a78dfcfa1eb",
      "old_mode": 33188,
      "old_path": "src/resources/Documentation/config.md",
      "new_id": "803839a6546407816eac11d36465402ce57bb89e",
      "new_mode": 33188,
      "new_path": "src/resources/Documentation/config.md"
    },
    {
      "type": "modify",
      "old_id": "7397132d2cd6c4968da1c2b2a05edbac6f89a99c",
      "old_mode": 33188,
      "old_path": "src/test/java/com/googlesource/gerrit/plugins/gitrepometrics/GitRepoMetricsCacheIT.java",
      "new_id": "4eee7364267a709dfbf92ad7faae0716002802ac",
      "new_mode": 33188,
      "new_path": "src/test/java/com/googlesource/gerrit/plugins/gitrepometrics/GitRepoMetricsCacheIT.java"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "d1ed3ef7701801492704e854130539c340fc8a5d",
      "new_mode": 33188,
      "new_path": "src/test/java/com/googlesource/gerrit/plugins/gitrepometrics/collectors/GitRefsMetricsCollectorTest.java"
    }
  ]
}
