← Back to team overview

dhis2-devs team mailing list archive

Weakness in the assignment of organisational units to users

 

Hi Devs,
I have been working with Stephen on his database, and have detected a
weakness in the code in 2.5 and trunk. I suspect this has to do with
the changes which we introduced related to the handling of multiple
orgunit roots, but am not 100% sure. Let me describe the problem.
Stephen has about 4000 orgunits, not a huge number say compared to
Nigeria for instance. We noticed the problem already at login, where
it took a very long time for the user to be authenticated. The CPU
usage of Tomcat shot up through the roof, and stayed there for almost
2 minutes. The issue seems to be that ALL orgunits had been assigned
to the admin user, instead of just the highest level root orgunit. The
other strange thing was, that the orgunit tree was "flat" after
assigning all orgunits to the admin user. There was no hierarchy, and
all operations which involved ouwt were extremely slow. We deleted all
associations of the admin user in the usermembership table, and then
reassigned ONLY the root orgunit. Login took about 2 seconds, and
everything performed as expected.

So, there seems to be a weakness somewhere in the code which we need
to take a look at, and I suspect it is related to the bug I filed the
other day [1] and the revisions which we did not test very well before
the release of 2.5 related to the handling of multiple roots. As a
variant of the procedure described in that bug report, just assign all
orgunits to a user and then login with that user. The login takes much
much longer.

Thoughts?

Regards,
Jason




[1] https://bugs.launchpad.net/dhis2/+bug/891005


Follow ups