crash log: No such pseudo-hash field "high_priority" at
/usr/lib/perl5/site_perl/5.8.5/Perlbal/Plugin/Stats.pm line 47.
Eamon Daly
edaly at nextwavemedia.com
Mon Jan 21 17:15:22 UTC 2008
[Possible repost, as I'd sent the patch and test as an
attachment previously.]
If I define a Vpaths selector and fire a request through it
while the Stats plugin is active in the destination service,
I get a crash:
crash log: No such pseudo-hash field "high_priority" at
/usr/lib/perl5/site_perl/5.8.5/Perlbal/Plugin/Stats.pm line 47.
Not quite sure what's to blame, but this fixes it:
diff -Naur Perlbal-1.60/lib/Perlbal/Plugin/Stats.pm
Perlbal-1.60-patch/lib/Perlbal/Plugin/Stats.pm
--- Perlbal-1.60/lib/Perlbal/Plugin/Stats.pm 2007-07-30
14:04:41.000000000 -0500
+++ Perlbal-1.60-patch/lib/Perlbal/Plugin/Stats.pm 2008-01-16
11:31:17.000000000 -0600
@@ -43,10 +43,12 @@
# more complicated statistics
$svc->register_hook('Stats', 'backend_client_assigned', sub {
my Perlbal::BackendHTTP $be = shift;
+ my Perlbal::ClientProxy $obj = $be->{client};
$sobj->{pending}->{"$be->{client}"} = [ gettimeofday() ];
- ($be->{client}->{high_priority} ? $sobj->{proxy_requests_highpri} :
$sobj->{proxy_requests})++;
+ ($obj->{high_priority} ? $sobj->{proxy_requests_highpri} :
$sobj->{proxy_requests})++;
return 0;
});
+
$svc->register_hook('Stats', 'backend_response_received', sub {
my Perlbal::BackendHTTP $be = shift;
my Perlbal::ClientProxy $obj = $be->{client};
The patch and a test for the Stats plugin can be found here:
http://www.eamondaly.com/perl/Perlbal/stats.patch
____________________________________________________________
Eamon Daly
More information about the perlbal
mailing list