You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 11, 2020. It is now read-only.
Sometimes deleting several references in a row do not work. In the test file provided several references are deleted a row. When the test finishes the repository sometimes still have references. Adding a sleep between RemoveReference calls fixes the problem so it may be caused by a race condition.
Since the modifications are done at exactly the same second, even maybe the same nanosecond the modTime remains the same and cache is not refreshed. Even if we modify the code to invalidate the cache this doesn't means that an external program can reproduce a similar behavior.
@erizocosmico the read of references are a bottleneck? How much was improvement of this PR?
The main bottleneck was traversing all directories under refs/ (because Refs was being called inside Ref) as far as I remember, so I think we should be good reverting that. We could maybe just read until the reference is found, not making it necessary to read the whole file, for example.
Sometimes deleting several references in a row do not work. In the test file provided several references are deleted a row. When the test finishes the repository sometimes still have references. Adding a sleep between
RemoveReference
calls fixes the problem so it may be caused by a race condition.https://gist.github.com/jfontan/79187ee5e278f3a769a6a69bfc60a837
The text was updated successfully, but these errors were encountered: