aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.lfs
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@google.com>2019-08-31 21:33:58 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2019-09-03 10:37:30 +0200
commit0e3d4a273f3d5b79c55205a25f21d688b6f131fc (patch)
treeaff2fa6e991a32c7a2528849b994eb9f577ed211 /org.eclipse.jgit.lfs
parent400342bbc1cff644ee9d7fd1076e62be89bb54f4 (diff)
downloadjgit-0e3d4a273f3d5b79c55205a25f21d688b6f131fc.tar.gz
jgit-0e3d4a273f3d5b79c55205a25f21d688b6f131fc.zip
BatchRefUpdate: repro racy atomic update, and fix it
PackedBatchRefUpdate was creating a new packed-refs list that was potentially unsorted. This would be papered over when the list was read back from disk in parsePackedRef, which detects unsorted ref lists on reading, and sorts them. However, the BatchRefUpdate also installed the new (unsorted) list in-memory in RefDirectory#packedRefs. With the timestamp granularity code committed to stable-5.1, we can more often accurately decide that the packed-refs file is clean, and will return the erroneous unsorted data more often. Unluckily timed delays also cause the file to be clean, hence this problem was exacerbated under load. The symptom is that refs added by a BatchRefUpdate would stop being visible directly after they were added. In particular, the Gerrit integration tests uses BatchRefUpdate in its setup for creating the Admin group, and then tries to read it out directly afterward. The tests recreates one failure case. A better approach would be to revise RefList.Builder, so it detects out-of-order lists and automatically sorts them. Fixes https://bugs.eclipse.org/bugs/show_bug.cgi?id=548716 and https://bugs.chromium.org/p/gerrit/issues/detail?id=11373. Bug: 548716 Change-Id: I613c8059964513ce2370543620725b540b3cb6d1 Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.lfs')
0 files changed, 0 insertions, 0 deletions