collective / pas.plugins.sqlalchemy

SQLAlchemy PAS plugin (Authentication) for Zope2/ Plone
http://plone.org/products/pas.plugins.sqlalchemy/
7 stars 7 forks source link

Problem mitigated (for real this time) #2

Closed zedr closed 13 years ago

zedr commented 13 years ago

Mitigated issue/1 by limiting the number of results directly in the SQL statement. Will also display a portal status message if the limit is hit. Tested on MySQL.

The problem stems from a very expensive SQL statement in pas.plugins.sqlalchemy.plugin.Plugin.enumerateUsers() (plugin.py:234)

This is because the clause is always empty, even if keywords such as {'email': 'foobar'} are provided. I'll see if I can rewrite this method so it will honor the keywords and filter the query with the correct WHERE clauses. In the meantime, these changes will avoid stalling the instance when we have an enormous number of users.

auspex commented 13 years ago

Is this really meant to be closed, or do you still want me to pull those changes? zedr and Rigel are the same person, right? They even look like

the same commits.

derek

zedr commented 13 years ago

On Tue, Jun 7, 2011 at 2:53 PM, auspex reply@reply.github.com wrote:

Is this really meant to be closed, or do you still want me to pull those changes?  zedr and Rigel are the same person, right?  They even look like the same commits.

Hi Derek,

yes, sorry for the confusion. But somethhing new came up immediately after the pull request so I had to back track.

However, I have committed a revision to my fork that mitigates the problem entirely, with no apparent side effects. Feel free to check it out. Right now I'm finding a way to avoid limiting the number of results in the query statement.

Rigel (zedr)