Re: [Apache Bloodhound] #613: Add / remove milestone breaks a whole product
#613: Add / remove milestone breaks a whole product ---+--- Reporter: olemis| Owner: nobody Type: defect| Status: new Priority: blocker | Milestone: next 0.x Component: multiproduct |Version: 0.6.0 Resolution:| Keywords: milestone, postgresql, db, sqlite ---+--- Comment (by wimh): I currently can't respond to the lru_cache decorator, I did not look into that part of the code. But I think there are two separate issues with the adding/removing of milestones. = !QuickCreateTicketDialog = If I disable the !QuickCreateTicketDialog from the !BloodhoundTheme plugin, this error will not be shown again after deleting a milestone: {{{ Error: Invalid milestone name Milestone milestone2 does not exist. }}} = !MilestoneCache = But still after adding or deleting milestones, the changes are not always visible in the list. If I remove the {{{@cached}}} decorator from source:/trunk/trac/trac/ticket/model.py#L949 (ie replace it with {{{@property}}} and remove both lines containing {{{del self.cache.milestones}}}), that is fixed too. But this alone is not sufficient to fix the !QuickCreateTicketDialog. The first issue seems to resolve itself after a few minutes. I am not sure about the second issue, it looks like apache must be restarted to fix that. Note that another easy way to reproduce this is running two {{{tracd}}} processes on different ports. -- Ticket URL: https://issues.apache.org/bloodhound/ticket/613#comment:19 Apache Bloodhound https://issues.apache.org/bloodhound/ The Apache Bloodhound issue tracker
svn commit: r1611921 - in /bloodhound/trunk/bloodhound_multiproduct/multiproduct: env.py hooks.py
Author: gjm Date: Sat Jul 19 17:07:48 2014 New Revision: 1611921 URL: http://svn.apache.org/r1611921 Log: clearing the lru_cache close to the beginning of a request to limit impact of caching errors in multi process/threaded web serving - towards #613 Modified: bloodhound/trunk/bloodhound_multiproduct/multiproduct/env.py bloodhound/trunk/bloodhound_multiproduct/multiproduct/hooks.py Modified: bloodhound/trunk/bloodhound_multiproduct/multiproduct/env.py URL: http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_multiproduct/multiproduct/env.py?rev=1611921r1=1611920r2=1611921view=diff == --- bloodhound/trunk/bloodhound_multiproduct/multiproduct/env.py (original) +++ bloodhound/trunk/bloodhound_multiproduct/multiproduct/env.py Sat Jul 19 17:07:48 2014 @@ -365,6 +365,8 @@ class ProductEnvironment(Component, Comp g_env = env.parent if isinstance(env, ProductEnvironment) else env return f(self, g_env, *args, **kwargs) +__call__.clear = f.clear + return __call__ def product_env_keymap(args, kwds, kwd_mark): @@ -397,6 +399,10 @@ class ProductEnvironment(Component, Comp setup_participants = ExtensionPoint(trac.env.IEnvironmentSetupParticipant) multi_product_support_components = ExtensionPoint(ISupportMultiProductEnvironment) +@classmethod +def clear_env_cache(cls): +cls.__metaclass__.__call__.clear() + @property def product_setup_participants(self): return [ Modified: bloodhound/trunk/bloodhound_multiproduct/multiproduct/hooks.py URL: http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_multiproduct/multiproduct/hooks.py?rev=1611921r1=1611920r2=1611921view=diff == --- bloodhound/trunk/bloodhound_multiproduct/multiproduct/hooks.py (original) +++ bloodhound/trunk/bloodhound_multiproduct/multiproduct/hooks.py Sat Jul 19 17:07:48 2014 @@ -37,6 +37,8 @@ PRODUCT_RE = re.compile(r'^/products(?:/ class MultiProductEnvironmentFactory(EnvironmentFactoryBase): def open_environment(self, environ, env_path, global_env, use_cache=False): +# clearing product environment cache - bh:ticket:613 +multiproduct.env.ProductEnvironment.clear_env_cache() environ.setdefault('SCRIPT_NAME', '') # bh:ticket:594 env = pid = product_path = None
Re: [Apache Bloodhound] #613: Add / remove milestone breaks a whole product
#613: Add / remove milestone breaks a whole product ---+--- Reporter: olemis| Owner: gjm Type: defect| Status: accepted Priority: blocker | Milestone: next 0.x Component: multiproduct |Version: 0.6.0 Resolution:| Keywords: milestone, postgresql, db, sqlite ---+--- Changes (by gjm): * owner: nobody = gjm * status: new = accepted Comment: patch from comment:18 committed in r1611921 I think wimh's findings are still consistent with my analysis and there are multiple symptoms resulting from the same underlying problem. Running multiple tracd processes can be considered roughly the same as having {{{processes=2}}} for the {{{WSGIDaemonProcess}}}. To be fair I haven't replicated any errors around this that I believe resolve themselves after a few minutes as the errors I observed will continue to appear intermittently until the webserver restarts. With luck the commit is a good enough solution for now. -- Ticket URL: https://issues.apache.org/bloodhound/ticket/613#comment:20 Apache Bloodhound https://issues.apache.org/bloodhound/ The Apache Bloodhound issue tracker
[Apache Bloodhound] BloodhoundInstall modified
Page BloodhoundInstall was changed by wimh Diff URL: https://issues.apache.org/bloodhound/wiki/BloodhoundInstall?action=diffversion=30 Revision 30 Comment: additional instructions for PostgreSQL Changes: ---8--8--8--8--8--8--8--8 Index: BloodhoundInstall = --- BloodhoundInstall (version: 29) +++ BloodhoundInstall (version: 30) @@ -104,6 +104,12 @@ source ./bloodhound/bin/activate pip install -r requirements.txt }}} + +If you are using PostgreSQL, you also need to run: + {{{#!sh + pip install -r pgrequirements.txt + }}} +If this fails, you might need you to install the python-dev and postgres-dev packages and try again. Then run the {{{bloodhound_setup.py}}} script: {{{#!sh ---8--8--8--8--8--8--8--8 -- Page URL: https://issues.apache.org/bloodhound/wiki/BloodhoundInstall Apache Bloodhound https://issues.apache.org/bloodhound/ The Apache Bloodhound issue tracker This is an automated message. Someone added your email address to be notified of changes on 'BloodhoundInstall' page. If it was not you, please report to .
Re: [Apache Bloodhound] #613: Add / remove milestone breaks a whole product
#613: Add / remove milestone breaks a whole product ---+--- Reporter: olemis| Owner: gjm Type: defect| Status: accepted Priority: blocker | Milestone: next 0.x Component: multiproduct |Version: 0.6.0 Resolution:| Keywords: milestone, postgresql, db, sqlite ---+--- Comment (by wimh): Replying to [comment:20 gjm]: With luck the commit is a good enough solution for now. It fixes the problems for me, but do I understand it correctly it flushes all caches each time for each request? At least in the {{{MilestoneCache}}} it looks like a new SQL query is done each time I refresh the milestones admin page. -- Ticket URL: https://issues.apache.org/bloodhound/ticket/613#comment:21 Apache Bloodhound https://issues.apache.org/bloodhound/ The Apache Bloodhound issue tracker