Greg Hudson wrote:
>>Transmitting file data .svn: Commit failed (details follow):
>>svn: Transaction out of date.
>
> I also fixed this bug, in r9657.
its still there (or maybe another one with the same effect)
but this may be of interrest to you:
console #1:
svn: Commit failed (details follow):
svn: Can't open file 'X:/SVNSandbox/TestFSFS/RepoFS/db/ \
transactions/KBQQdn.txn/rev': The file exists.
console #2:
Sending Version.h
svn: Commit failed (details follow):
svn: Can't read file 'X:/SVNSandbox/TestFSFS/RepoFS/db/ \
transactions/KBQQdn.txn/0.0': End of file found
obviously, the two processes access the SAME txn folder
and offcourse this results in strange collisions.
(this effect can be reproduced).
i think the bug is here:
if (apr_file_mktemp (&txn_file, txn_filename, 0, pool) != APR_SUCCESS)
return svn_error_create (SVN_ERR_FS_CORRUPT, NULL,
"Unable to create new transaction.");
/* Create the transaction directory based on this temporary file. */
txn_dirname = apr_pstrcat (pool, txn_filename, SVN_FS_FS__TXNS_EXT,
NULL);
SVN_ERR (svn_io_make_dir_recursively (txn_dirname, pool));
SVN_ERR (svn_io_file_close (txn_file, pool));
you create a unique filename through apr, but then DELETE
that unique file. and then you try to create a new folder
with the 'deleted' file's name. but since you delete the
unique file first, the name is no longer unique and the
second process is taking the same name.....
i think you have several options:
- use a simple increasing number for the txn folders
with that number stored similar to db/uuid or db/current
(+1)
- directly use an uuid
(+0)
- create the unique file, but then keep it alive as long as
you also have to keep the 'unique'.txn folder.
(-0)
- check if svn_io_make_dir_recursively fails and if it does,
simply try another unique name. (-1, this could loop forever).
=====
:-)
c.a.t.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun May 9 07:28:57 2004