From 775bcb5b9a5178843f7dcb1ef74160b3e42db467 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Thu, 10 May 2012 20:00:36 +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/branches/2.7@12609 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 f2d23f30b..e136d45c8 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}="";