From bb760cf069445fd4e2f2d95850111682031a6185 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Thu, 10 May 2012 19:59:49 +0000 Subject: [PATCH] Try to do more reuse of nodelist objects in db worker git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12608 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/Table.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/perl-xCAT/xCAT/Table.pm b/perl-xCAT/xCAT/Table.pm index f6091c3d9..867a2015f 100644 --- a/perl-xCAT/xCAT/Table.pm +++ b/perl-xCAT/xCAT/Table.pm @@ -739,6 +739,10 @@ sub new return undef; } } else { #direct db access mode + if ($opentables{$self->{tabname}}->{$self->{autocommit}}) { #if we are inside the db worker and asked to create a new table that is already open, just return a reference to that table + #generally speaking, this should cause a lot of nodelists to be shared + return $opentables{$self->{tabname}}->{$self->{autocommit}}; + } $self->{dbuser}=""; $self->{dbpass}="";