summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.http.server
diff options
context:
space:
mode:
authorChristian Halstrick <christian.halstrick@sap.com>2011-05-20 11:18:20 +0200
committerChris Aniszczyk <caniszczyk@gmail.com>2011-05-23 14:48:10 -0500
commit2302a6d3ceea2926e785dba57abd58f609684e86 (patch)
tree9a7a543cad0be99236cbc2792f88c40e59f0cabf /org.eclipse.jgit.http.server
parent16e810b2ec37c2db8bc0e39426be385024a8de8a (diff)
downloadjgit-2302a6d3ceea2926e785dba57abd58f609684e86.tar.gz
jgit-2302a6d3ceea2926e785dba57abd58f609684e86.zip
Let RefDirectory use FileSnapShot to handle fast updates
Since this change may affect performance and memory consumption on every access to a loose ref I explicitly made it a RFC to collect opinions. Previously RefDirectory.scanRef() was not detecting an update of a loose ref when the update didn't changed the modification time of the backing file. RefDirectory cached loose refs and the way to detect outdated cache entries was to compare lastmodification timestamp on the file representing the ref. If two updates to the same ref happen faster than the filesystem-timer granularity (for linux this is 2 seconds) there is the possiblity that we don't detect the update. Because of this bug EGit's PushOperationTest only works with 2 second sleeps inside. This change let RefDirectory use FileSnapshot to detect such situations. FileSnapshot helps to remember when a file was last read from disk and therefore enables to decide when to load a file from disk although modification time has not changed. Change-Id: I03b9a137af097ec69c4c5e2eaa512d2bdd7fe080 Signed-off-by: Christian Halstrick <christian.halstrick@sap.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.http.server')
0 files changed, 0 insertions, 0 deletions