)]}'
{
  "commit": "36bde9cd3407402ef6e0b4d10b038a4020bdf295",
  "tree": "df868c44f56171a2dfef74f844848a218820846d",
  "parents": [
    "87bbf7e4b41500316e93f98bee0564eb2cfb0366"
  ],
  "author": {
    "name": "Jan Schär",
    "email": "jan@jschaer.ch",
    "time": "Tue Mar 19 15:05:33 2024 +0100"
  },
  "committer": {
    "name": "Jan Schär",
    "email": "jan@jschaer.ch",
    "time": "Tue Mar 19 15:25:01 2024 +0000"
  },
  "message": "m/pkg/event/memory: simplify and fix implementation\n\nThe old implementation is very complicated and has multiple concurrency \nbugs. One of these bugs is already described in a block comment. Another \nbug is that if a watcher is closed while being updated, `update` will \ntry to send on the closed channel `deadletterSubmitC`, which panics.\n\nThis changes it to a much simpler implementation.\n\nIt could be further simplified it by dropping the Sync flag entirely, \nwhich is currently unused. Or we could use the buffered channel also for \nSync values, and just skip dropping previous values. This still ensures \nthat all values are delivered, but changes the semantics slightly: Set \nwould no longer block until Get is called, if there is space in the \nchannel buffer.\n\nAdditionally, there is no longer a memory leak when a watcher is \nrepeatedly closed and readded, but Set never called. I added a test for \nthis.\n\nFixes #127\n\nChange-Id: I2775a36cf2d097c5961a09a387428774a068e1f5\nReviewed-on: https://review.monogon.dev/c/monogon/+/2875\nReviewed-by: Serge Bazanski \u003cserge@monogon.tech\u003e\nVouch-Run-CI: Serge Bazanski \u003cserge@monogon.tech\u003e\nTested-by: Jenkins CI\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "0898eb5405dce399201f58acc497ce37d5df8695",
      "old_mode": 33188,
      "old_path": "metropolis/pkg/event/event.go",
      "new_id": "cb8b9b53588376bf735ac47cd4255e99d3b02b92",
      "new_mode": 33188,
      "new_path": "metropolis/pkg/event/event.go"
    },
    {
      "type": "modify",
      "old_id": "c8a8bae7b0f8fe36cd3a510ab06a101e3c2d42dd",
      "old_mode": 33188,
      "old_path": "metropolis/pkg/event/memory/BUILD.bazel",
      "new_id": "da07dc3e2bef2d17b18608e74658513d6454a6e4",
      "new_mode": 33188,
      "new_path": "metropolis/pkg/event/memory/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "f0a2ab9e41c5bb45cc0c27da5a8dfc577722ddf0",
      "old_mode": 33188,
      "old_path": "metropolis/pkg/event/memory/memory.go",
      "new_id": "c684c18e81f4b6e91a8452d195b6257412368b3e",
      "new_mode": 33188,
      "new_path": "metropolis/pkg/event/memory/memory.go"
    },
    {
      "type": "modify",
      "old_id": "41f121e743e74c7f586789894277b41a8367f2b0",
      "old_mode": 33188,
      "old_path": "metropolis/pkg/event/memory/memory_test.go",
      "new_id": "98a150114f220fa69bfe05fd8a56cf23326aab6d",
      "new_mode": 33188,
      "new_path": "metropolis/pkg/event/memory/memory_test.go"
    }
  ]
}
