Chris Darroch wrote:
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
structures.
Yes that is what I am refering to.
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.
Ok.
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.
Chris.