Hi William,
When testing for a return from getResponse(), would it be better to save off
the return locally so that it could be used, rather than calling it again? For
example:
response = query.getResponse()
if response is not None:
return response[0][0]
It seems either wasteful to call it twice, or even possible that you might end
up with the same situation (though far less likely), since you check it, then
call it again.
Best
Jesse
On Aug 18, 2011, at 7:51 AM, schumann william wrote:
> https://cr.opensolaris.org/action/browse/caiman/wmsch/7073935/webrev/
>
> The stress errors are due to database lookups on manifests and profiles that
> have been deleted during 'installadm list -p/-m'. For example, in
> AI_database.py:getNames(), the number of names (manifest or profile entries)
> is counted, then database queries are launched one at a time (a memory usage
> limitation feature for very large queries), which introduces a window during
> which the entry can be deleted, and the corresponding query fails.
>
> The solution is to add checks that the rows exist in the query output before
> referencing them.
>
> Stress-tested with this script and variations, looping, using 5 different
> profiles at a time, then launching the same script multiple times to compound
> the contention:
>
> import sys
> import subprocess
> mysys = sys.argv[1] # profile
> mysvc = '167nightly'
> mycp = ['installadm', 'create-profile', '-p', mysys, '-n', mysvc, '-f', mysys]
> myls = ['installadm', 'list', '-p', '-n', mysvc]
> mydp = ['installadm', 'delete-profile', '-p', mysys, '-n', mysvc]
> subprocess.call(mycp)
> subprocess.call(myls)
> subprocess.call(mydp)
>
> Calling code was checked for compatibility.
>
> Related pyunit tests pass.
> _______________________________________________
> caiman-discuss mailing list
> [email protected]
> http://mail.opensolaris.org/mailman/listinfo/caiman-discuss
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss