)]}'
{
  "commit": "c97a86a72105f3328a540f5a5ab17d11989ab7dd",
  "tree": "1e4e727a3772bf9d6e3ffab4e98a649e6fb68d5a",
  "parents": [
    "7296b601ea80252ccf8cce300c4bebcabf235f20"
  ],
  "author": {
    "name": "Greg Thompson",
    "email": "grt@chromium.org",
    "time": "Tue Dec 17 13:06:31 2024 +0100"
  },
  "committer": {
    "name": "GN LUCI",
    "email": "gn-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Tue Dec 17 11:37:58 2024 -0800"
  },
  "message": "Retry ReplaceFile in case of failure\n\nThe Win32 ReplaceFile function performs several IO operations under the\ncovers. Among these is creating a temporary file to which the original\nfile will be moved. Aggressive filesystem scanners, such as A/V software\nor git fsmontor--daemon, may inspect this temporary file. When such\nsoftware wins the race with the actual movement of the file, ReplaceFile\nwill fail with ERROR_UNABLE_TO_REMOVE_REPLACED. This is unfortunate.\n\nThis CL makes base::ReplaceFile a bit more robust against these scanners\nby retrying a call to ReplaceFile that fails in this way for up to half\na second. In local experimentation, the second or third attempt tends to\nsucceed when the first fails.\n\nThis is a band-aid over failures of the \"ERROR Failed to write\nbuild.ninja.\" variety.\n\nBug: 384523565\nChange-Id: Ia77e596687fd91daa888bcc6c07604b845093295\nReviewed-on: https://gn-review.googlesource.com/c/gn/+/18020\nReviewed-by: Dirk Pranke \u003cdpranke@google.com\u003e\nReviewed-by: David Turner \u003cdigit@google.com\u003e\nCommit-Queue: Dirk Pranke \u003cdpranke@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "774d1e382867735429640fb6ede53eb2f66c79bb",
      "old_mode": 33188,
      "old_path": "src/base/files/file_util_win.cc",
      "new_id": "0bc07bf21515a186d5fc871c8fffbc31c3c245f3",
      "new_mode": 33188,
      "new_path": "src/base/files/file_util_win.cc"
    }
  ]
}
