Skip Menu |
 

This queue is for tickets about the Kx CPAN distribution.

Report information
The Basics
Id: 53655
Status: new
Priority: 0/
Queue: Kx

People
Owner: Nobody in particular
Requestors: IANRODDIS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.039
Fixed in: (no value)



Subject: Lost Connections cannot be restored
Download (untitled) / with headers
text/plain 661b
If a connection is established using Kx and subsequently lost, it cannot be restored. The connections are stored in the private class variable %DB. On the first connection, a record is defined in %DB. Any subsequent connections are tested to see if they're defined there, and if they are the old handle is returned without checking to see if the handle is still good or not. There is no way to modify this variable, and no published disconnect mechanism, which would be useful if there are a lot of connections or file descriptor exhaustion is a concern. Patch attached adds logic to test the handle and undefine it if it's bad, thereby forcing the reconnect.
Subject: Kx.pm.roddis-connect.patch
183a184,191 > if(defined $DB{$name}{'kdb'}) > { > # Check to see if the connection is alive. If it's not > # make it undef to force the reconnect > my $result = $DB{$name}{'kdb'}->cmd("1b"); > delete ( $DB{$name} ) unless ( $result ); > } >


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.