Mailing List Archive

Re: svn commit: r1902117 - /httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c
On 6/20/22 10:54 PM, rjung@apache.org wrote:
> Author: rjung
> Date: Mon Jun 20 20:54:14 2022
> New Revision: 1902117
>
> URL: http://svn.apache.org/viewvc?rev=1902117&view=rev
> Log:
> *) mod_heartmonitor: Allow "HeartbeatMaxServers 0"
> to use file based storage instead of slotmem.
> Needed after setting HeartbeatMaxServers default
> to the documented value 10 in 2.4.54.
> [Jérôme Billira
>
> Modified:
> httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c
>
> Modified: httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c
> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c?rev=1902117&r1=1902116&r2=1902117&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c (original)
> +++ httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c Mon Jun 20 20:54:14 2022
> @@ -892,8 +892,9 @@ static const char *cmd_hm_maxworkers(cmd
> }
>
> maxworkers = atoi(data);
> - if (maxworkers <= 10)
> - return "HeartbeatMaxServers: Should be bigger than 10";
> + if (maxworkers != 0 && maxworkers <= 10)

Shouldn't this be < 10, such that you can set the default value via HeartbeatMaxServers.
It seems strange that this can't be done. Furthermore <= 10 does not match the error message below.

> + return "HeartbeatMaxServers: Should be 0 for file storage, "
> + "or greater or equal than 10 for slotmem";

Shouldn't this be documented in the documentation as well that '0' has a special meaning and that 1-9 are not allowed?

Regards

Rüdiger
Re: svn commit: r1902117 - /httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c [ In reply to ]
Am 21.06.2022 um 07:38 schrieb Ruediger Pluem:
>
>
> On 6/20/22 10:54 PM, rjung@apache.org wrote:
>> Author: rjung
>> Date: Mon Jun 20 20:54:14 2022
>> New Revision: 1902117
>>
>> URL: http://svn.apache.org/viewvc?rev=1902117&view=rev
>> Log:
>> *) mod_heartmonitor: Allow "HeartbeatMaxServers 0"
>> to use file based storage instead of slotmem.
>> Needed after setting HeartbeatMaxServers default
>> to the documented value 10 in 2.4.54.
>> [Jérôme Billira
>>
>> Modified:
>> httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c
>>
>> Modified: httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c
>> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c?rev=1902117&r1=1902116&r2=1902117&view=diff
>> ==============================================================================
>> --- httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c (original)
>> +++ httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c Mon Jun 20 20:54:14 2022
>> @@ -892,8 +892,9 @@ static const char *cmd_hm_maxworkers(cmd
>> }
>>
>> maxworkers = atoi(data);
>> - if (maxworkers <= 10)
>> - return "HeartbeatMaxServers: Should be bigger than 10";
>> + if (maxworkers != 0 && maxworkers <= 10)
>
> Shouldn't this be < 10, such that you can set the default value via HeartbeatMaxServers.
> It seems strange that this can't be done. Furthermore <= 10 does not match the error message below.

Oups, thank you! Hopefully fixed in r1902130

>> + return "HeartbeatMaxServers: Should be 0 for file storage, "
>> + "or greater or equal than 10 for slotmem";
>
> Shouldn't this be documented in the documentation as well that '0' has a special meaning and that 1-9 are not allowed?

Done in r1902132 + r1902133

I hope I understood the correct conditions for using flat-file storage.

Best regards,

Rainer