)]}' { "commit": "48ff6f398941572243a0fd7aa26e07d6c95696a1", "tree": "86de8fa87c75f114780a6d69415742dd9dfc2869", "parents": [ "94a465e0989ff8124aca3dca8e200aeb870cc9dd" ], "author": { "name": "Martin Fick", "email": "mfick@codeaurora.org", "time": "Mon Oct 14 16:57:35 2019 -0600" }, "committer": { "name": "Martin Fick", "email": "mfick@codeaurora.org", "time": "Fri Oct 25 14:15:35 2019 -0600" }, "message": "Fix potential loss of persisted replication task\n\nThere was a race window between the check to see if any new updates were\navailable for the completed update and the deletion of the persistent\nupdate. If an update occurred in that window it could leave the event\nmissing from the persisted task store. If the server went down before\nthis update completed, the update would be missed entirely.\n\nEliminate the race by separating the running tasks from the waiting\ntasks in the persistent store by placing each into their own\nsubdirectories. Place new waiting tasks in a \"waiting\" directory and\nmove them to the \"running\" directory once they are running. This allows\nnew updates to be persisted to the \"waiting\" directory while a similar\nupdate is running without the waiting task getting deleted when the\npersisted running task is deleted. On startup, reset all running tasks\nby moving them back to the waiting directory to ensure that they are\nretried.\n\nReset \"running\" tasks (return them to the \"waiting\" directory) when a\nretry is rescheduled, this allows the retry to be consolidated with the\nnew run, and helps ensure that the persistence store reflects what is\nactually happening better.\n\nBug: Issue 11672\nChange-Id: Ia31329e8d939f8e5cb1e7455de69744431f34d66\n", "tree_diff": [ { "type": "modify", "old_id": "dbdb3254d35c1f08a97f0a145109a8c5b4bff3c0", "old_mode": 33188, "old_path": "src/main/java/com/googlesource/gerrit/plugins/replication/Destination.java", "new_id": "4ebd67e6302950421243851cebaf971fb8e59c47", "new_mode": 33188, "new_path": "src/main/java/com/googlesource/gerrit/plugins/replication/Destination.java" }, { "type": "modify", "old_id": "e02fafcc6167baf4b2e145378f08f1e3249f51ef", "old_mode": 33188, "old_path": "src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationQueue.java", "new_id": "5dc8f73cf6ef6afdc549b18efe3d5b123fb495e8", "new_mode": 33188, "new_path": "src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationQueue.java" }, { "type": "modify", "old_id": "3b174a3c639c17206b3a2cf63b378a5c983c4e65", "old_mode": 33188, "old_path": "src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationTasksStorage.java", "new_id": "950ef26a44f0652b090bb7b21b08f168b6689a50", "new_mode": 33188, "new_path": "src/main/java/com/googlesource/gerrit/plugins/replication/ReplicationTasksStorage.java" }, { "type": "modify", "old_id": "d9d4bae30ce15a08741de735e8f2a500737fc9ab", "old_mode": 33188, "old_path": "src/main/resources/Documentation/config.md", "new_id": "7233061a77c25dab60c9cc9e085f829bb718e41e", "new_mode": 33188, "new_path": "src/main/resources/Documentation/config.md" }, { "type": "modify", "old_id": "3b7a3ed58b47917a217191133cffcc33e03ff887", "old_mode": 33188, "old_path": "src/test/java/com/googlesource/gerrit/plugins/replication/ReplicationIT.java", "new_id": "19269f0e8fe90cd8bc641550352371b2cfe43e04", "new_mode": 33188, "new_path": "src/test/java/com/googlesource/gerrit/plugins/replication/ReplicationIT.java" } ] }