crash log: No such pseudo-hash field "high_priority" at .../Stats.pm line 47

Ask Bjørn Hansen ask at develooper.com
Mon May 7 20:43:21 UTC 2007


Running from the latest SVN version.

When I configure a reverse_proxy service with stats enabled "hanging  
off" a selector service perlbal crashes with

	crash log: No such pseudo-hash field "high_priority" at .../Stats.pm  
line 47

I can't figure out how it happens (It only seemed to happen in  
production ...)

This patch fixes it, but I don't know if it's just fixing the  
symptoms of something else so I didn't commit.

Any ideas?


    - ask


--- lib/Perlbal/Plugin/Stats.pm (revision 670)
+++ lib/Perlbal/Plugin/Stats.pm (working copy)
@@ -44,7 +44,11 @@
      $svc->register_hook('Stats', 'backend_client_assigned', sub {
          my Perlbal::BackendHTTP $be = shift;
          $sobj->{pending}->{"$be->{client}"} = [ gettimeofday() ];
-        ($be->{client}->{high_priority} ? $sobj-> 
{proxy_requests_highpri} : $sobj->{proxy_requests})++;
+        (
+         (exists $be->{client}->{high_priority} and $be->{client}-> 
{high_priority})
+           ? $sobj->{proxy_requests_highpri}
+           : $sobj->{proxy_requests}
+         )++;
          return 0;
      });
      $svc->register_hook('Stats', 'backend_response_received', sub {



More information about the perlbal mailing list