Fix problem where Table.pm fails to skip cache for low nodecounts
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@11981 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		| @@ -57,6 +57,7 @@ if ($^O =~ /^aix/i) { | ||||
|  | ||||
| use lib "$::XCATROOT/lib/perl"; | ||||
| my $cachethreshold=16; #How many nodes in 'getNodesAttribs' before switching to full DB retrieval | ||||
| #TODO: dynamic tracking/adjustment, the point where cache is cost effective differs based on overall db size | ||||
|  | ||||
| use DBI; | ||||
| $DBI::dbi_debug=9; # increase the debug output | ||||
| @@ -2051,7 +2052,8 @@ sub getNodesAttribs { | ||||
|     } else { | ||||
|         @attribs = @_; | ||||
|     } | ||||
|     if (scalar($nodelist) > $cachethreshold) { | ||||
| 	#it should also be the case that cache will be used if it already is in play even if below cache threshold.  This would be desired behavior | ||||
|     if (scalar(@$nodelist) > $cachethreshold) { | ||||
|         $self->{_use_cache} = 0; | ||||
|         $self->{nodelist}->{_use_cache}=0; | ||||
|         if ($self->{tabname} eq 'nodelist') { #a sticky situation | ||||
|   | ||||
		Reference in New Issue
	
	Block a user