Menu

Commit [r6123]  Maximize  Restore  History

Fix a race condition in the !RepositoryManager constructor.

The problem can be easily reproduced when starting a dozen simultaneous queries on a server which has just been initialized. This triggers the following errors related to the svn_fs vc backend:
{{{
'Pool' object has no attribute '_pool'
}}}
or:
{{{
AttributeError: 'SubversionConnector' object has no attribute 'has_subversion'
}}}

Actually, ''all'' the component constructors are subject to multi-threading issues, this one was just the one that presented some symptoms. There should actually be some kind of locking at the level of `maybe_init` in `trac.core`.

I'll try that as a second step, as for now that local fix in the `RepositoryManager.__init__` constructor is enough to get rid of the reported problems.

cboos 2007-11-06

changed /trunk/trac/versioncontrol/api.py
/trunk/trac/versioncontrol/api.py Diff Switch to side-by-side view
Loading...