diff options
author | Martin Fick <quic_mfick@quicinc.com> | 2023-03-08 08:34:38 -0700 |
---|---|---|
committer | Luca Milanesio <luca.milanesio@gmail.com> | 2023-06-07 19:08:39 -0400 |
commit | f6928f57362d952b18a99d89d4778ca6ad75e84d (patch) | |
tree | 5f6e58fcbb8c3bef3749bf99a8494d9181cf2803 /org.eclipse.jgit.pgm | |
parent | 2fd050c5674a08f1a5ccbe6b6cfc922ce6144c4a (diff) | |
download | jgit-f6928f57362d952b18a99d89d4778ca6ad75e84d.tar.gz jgit-f6928f57362d952b18a99d89d4778ca6ad75e84d.zip |
Revert "RefDirectory: Throw exception if CAS of packed ref list fails"
This reverts commit 9c33f7364d41956240818ba12d8b79d5ea846162.
Reason for revert: This change was based on the false claim that the
packedrefs file lock is held while the CAS is being done, but it is
actually released before the CAS (the in memory lock is still held,
however that does not prevent external actors from updating the
packedrefs files and then another thread from subsequently re-reading it
and updating the in memory packedRefList). Although reverting this
change can cause the CAS to fail, it should not actually matter since
the failure would indicate that another thread has already updated the
in memory packedRefList to either the same version this thread was
trying to update it too, or to a more recent version. Either way,
failing the CAS is then appropriate and should not be problematic.
Although this change reverts the code in the RefDirectory class, it
keeps the "improvements" to the test so that it continues to pass
reliably. The reason for the quotes around the word "improvements" is
because I believe the test alteration actually dramatically changes the
intent of the test, and that the original intent of the test is
untestable with the GC and RefDirectory classes as is.
Bug: 582044
Change-Id: I3acee7527bb542996dcdfaddfb2bdb45ec444db5
Signed-off-by: Martin Fick <quic_mfick@quicinc.com>
(cherry picked from commit c5617711a1b4d5d0807cc7eed702b78d114d46b3)
Diffstat (limited to 'org.eclipse.jgit.pgm')
0 files changed, 0 insertions, 0 deletions