Uploaded image for project: 'Grouper'
  1. Grouper
  2. GRP-320

subject API returns too many results and causes errors

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 1.5.0
    • 1.5.0
    • UI
    • None

    Description

      We have a subject search field which includes in the user is active or not active. So if someone searches for "active" (actually, this is the "filter" in the lite ui, which I should change the label to "search" instead of "filter"), then the subject API returns hundreds of thousands of results (since it matches "active" and "not active" and our tomcat runs out of memory. I kind of think subject sources should have a config option (optional) where it can throw an exception if too many results are returned (e.g. we might set ours to 1000). So for instance in a JDBC source, it could do a count, if the count is ok, do the query. Or it could do the query, and cycle through the resultset until the limit, and throw the exception before continuing. This would be a subclass of RuntimeException so it wouldn't affect the compilation of other people's code. Then UI's could catch that exception and tell the user to narrow the search. I think we would need to add code to handle that exception in the lite UI and the regular UI. I can implement this in the jdbc2 source. Not sure what is possible for jndi sources. Thoughts?

      Attachments

        Activity

          People

            chris.hyzer@at.internet2.edu Chris Hyzer (upenn.edu)
            chris.hyzer@at.internet2.edu Chris Hyzer (upenn.edu)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: