httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Darroch <>
Subject Re: [PATCH 1/6] scoreboard over-sized
Date Fri, 12 May 2006 13:31:34 GMT
Jean-frederic Clere wrote:

> BTW: lb_scrore has a size of 1024 and proxy_worker_stat 176...
> I am thinking in using this not yet used space.

   You're referring to ap_proxy_initialize_worker_share() in
proxy_util.c, I take it?  It seems to be the only user of the
1024 byte array in lb_score and fills it with proxy_worker_stat

   For a private module, you could of course use the extra space;
it's your call.  The comments in scoreboard.h about the 1024 byte
array ("TODO: make a real stuct from this") make it fairly clear
that you shouldn't assume that array is a permanent feature, though.

   Personally, if I was writing a completely private module, I'd
probably just patch the scoreboard.h definition of lb_score to include
whatever extra stuff I needed, and recompile httpd.  That way I'm
insulated from any changes to the size of either the array or the
proxy_worker_stat structure; if they change at some point in a
future release and I don't happen to notice, I'm safe so long as
I keep patching in my extra fields.

   Now, if you're thinking instead of contributing a public patch
to httpd, then I think that you'd definitely want to avoid just
using more of the array -- it's a small hack now, but adding to
it will only make it harder to tidy up later.  Better to add
some fields to lb_score so that people can understand what's going
on with your stuff.  That's just IMHO, of course.


GPG Key ID: 366A375B
GPG Key Fingerprint: 485E 5041 17E1 E2BB C263  E4DE C8E3 FA36 366A 375B

View raw message