[EMAIL PROTECTED] wrote: > On Tue, 14 May 2002, Bernd Koecke wrote: > > >>The '0' as lb_value is needed to determine which are the main/local-workers. If >>we don't have this special value we need an additional config-flag with a list >>of the local/main-workers like in Mathias patch. >> >>Should I add an additional config-flag (I will take it from Mathias patch) or do >>we stay with the special '0' value? > > > I think it would be a good idea, it'll make things cleaner. > > 'local_worker' would be allways selected, and if 'main_worker_mode' ( or > maybe 'hw_lb_mode' ) no fallback will happen. > > > >>The 'main_worker_mode' is not the same like the 'in_main_worker_mode' var in >>lb_worker struct. If 'main_worker_mode' flag is set to 'reject' in the >>workers.properties the reject var of lb_worker struct is set to JK_TRUE. The >>'in_main_worker_mode' var of lb_worker struct is set to JK_TRUE if there is in >>minimum one worker with '0' as lb_value. > > > That's a bit confusing. Maybe some better variable names are needed. > > 2 flags should be enough - 'local_worker' and 'local_worker_only' ( or > something that makes it clear that if the flag is set, no fallback will > occur but an error is returned for the hw balancer ).
Ok, how should we handle the local_worker list? The current code depends on one worker list. And for requests with a session its easier to look into one list. Is it ok to have the balanced_workers and one ore more of these workers could be in the local_worker list? Then we could leave must of the code in validate function untouched and after getting all the workers we go through the local_worker list, if any, and move the worker from this list at the beginning of the balanced_workers and mark them as local. Would this be ok? Oterwise we have to handle two lists and it would be possible to have only local workers and no balanced_workers. Then the lb_module makes no sense, but it is configurable and we have to deal with this. Another solution is to have two lists in config but only one in lb_worker. But then we have to rewrite most of the code in validate and handle memory etc. You know I'm not so experienced in C, so I would prefere the first suggestion :). Bernd > > I'll implement the same thing in jk2, but I wait your patch for jk1. > > Costin > > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > -- Dipl.-Inform. Bernd Koecke UNIX-Entwicklung Schlund+Partner AG Fon: +49-721-91374-0 E-Mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>