mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-31 11:22:27 +00:00 
			
		
		
		
	-Fix for circumstances where a single Table object lifetime spans the period before DB worker is initialized and after
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4136 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		| @@ -217,7 +217,18 @@ sub handle_dbc_request { | ||||
|         } else { | ||||
|             return 0; | ||||
|         } | ||||
|     } elsif ($functionname eq 'getAllAttribs') { | ||||
|     } else {  | ||||
|         unless (defined $opentables{$tablename}->{$autocommit}) { | ||||
|         #We are servicing a Table object that used to be  | ||||
|         #non data-worker.  Create a new DB worker side Table like the one | ||||
|         #that requests this | ||||
|             $opentables{$tablename}->{$autocommit} = xCAT::Table->new($tablename,-create=>0,-autocommit=>$autocommit); | ||||
|             unless ($opentables{$tablename}->{$autocommit}) { | ||||
|                 return undef; | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|     if ($functionname eq 'getAllAttribs') { | ||||
|          return $opentables{$tablename}->{$autocommit}->getAllAttribs(@args); | ||||
|     } elsif ($functionname eq 'getAttribs') { | ||||
|          return $opentables{$tablename}->{$autocommit}->getAttribs(@args); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user