Provide small performance boost to every exchange with DB worker process
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9756 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
da9770c8f7
commit
7f125d8e2e
@ -108,11 +108,12 @@ sub dbc_submit {
|
||||
print $clisock $data;
|
||||
$data="";
|
||||
my $lastline="";
|
||||
while ($lastline ne "ENDOFFREEZEQFVyo4Cj6Q0j\n" and $lastline ne "*XCATBUGDETECTED*76e9b54341\n") { #index($lastline,"ENDOFFREEZEQFVyo4Cj6Q0j") < 0) {
|
||||
$lastline = <$clisock>;
|
||||
while (read($clisock,$lastline,32768)) { #$lastline ne "ENDOFFREEZEQFVyo4Cj6Q0j\n" and $lastline ne "*XCATBUGDETECTED*76e9b54341\n") { #index($lastline,"ENDOFFREEZEQFVyo4Cj6Q0j") < 0) {
|
||||
# $lastline = <$clisock>;
|
||||
$data .= $lastline;
|
||||
}
|
||||
if ($lastline eq "*XCATBUGDETECTED*76e9b54341\n") { #if it was an error
|
||||
close($clisock);
|
||||
if ($lastline =~ m/*XCATBUGDETECTED*76e9b54341\n\z/) { #if it was an error
|
||||
#in the midst of the operation, die like it used to die
|
||||
my $err;
|
||||
$data =~ /\*XCATBUGDETECTED\*:(.*):\*XCATBUGDETECTED\*/s;
|
||||
@ -241,8 +242,10 @@ sub handle_dbc_conn {
|
||||
@returndata = (scalar(handle_dbc_request($request)));
|
||||
}
|
||||
$response = freeze(\@returndata);
|
||||
$response .= "\nENDOFFREEZEQFVyo4Cj6Q0j\n";
|
||||
# $response .= "\nENDOFFREEZEQFVyo4Cj6Q0j\n";
|
||||
print $client $response;
|
||||
$clientset->remove($client);
|
||||
close($client);
|
||||
} else { #Connection terminated, clean up
|
||||
$clientset->remove($client);
|
||||
close($client);
|
||||
|
Loading…
x
Reference in New Issue
Block a user