Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jgit-dev] LockFile.waitForStatChange()

Hey JGit friends,

I've found myself puzzled by this bit of code and I'm hoping someone can enlighten me. This method just shows up in LockFile when Shawn created RefDirectory in 01b5392cdbc12ce2e21fd1d1afbd61fdf97e1c38 and has no further explanation to it. I can't figure out why we're comparing the timestamps of two different files (for example, packed-refs and packed-refs.lock) and ever expecting them to have been equal. Does someone understand that?

For some context, I'm looking at improving/creating a FileSnapshot-like class that can have policy for not trusting timestamps due to NFS attribute caching. FileSnapshot is used in a lot of places and likely most of them will have issues when NFS caches the lastModified time (as discussed on an earlier thread). Fixing packed-refs is a top priority because we've actually been bitten by it recently in production. Loose objects and .exists() (which is also cached) will probably be next.

Thanks!
Nasser

-- 
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, 
a Linux Foundation Collaborative Project



Back to the top