RE: Queries about rep cache: get_shared_rep()
From: Bert Huijben <bert_at_qqmail.nl>
Date: Wed, 27 May 2015 00:08:42 +0200
On Windows opening the file is sensitive to outside interactions and may trigger a retry loop. E.g. A virusscanber that scans every file before opening by hooking the OS. A filestat is +- a constant time operation that doesn't have these problems.
So this really depends on how common all cases are. If not existing or possibly locked is common, then statting first could certainly be useful... But if it is +- an error if the file doesn't exist and the file must be opened in almost every case then the open and handle errors keeps the code clean.
Not sure what case applies here, but without looking at the code I would guess that in > 99.9% of the cases we can assume the cache is correct... And all else is an exception that might have a slight performance hit.
Bert
-----Original Message-----
Index: subversion/libsvn_fs_fs/transaction.c
/* in our txn, is there a rep file named with the wanted SHA1?
/* A simple guard against general rep-cache induced corruption. */
- Because not sharing reps is always a save option,
err = svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
- Julian
|
This is an archived mail posted to the Subversion Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.