[MXS-436] Invalid threads argument is ignored and MaxScale starts with one thread Created: 2015-10-31  Updated: 2015-11-02  Resolved: 2015-11-02

Status: Closed
Project: MariaDB MaxScale
Component/s: Core
Affects Version/s: 1.2.1
Fix Version/s: 1.3.0

Type: Bug Priority: Minor
Reporter: markus makela Assignee: Johan Wikman
Resolution: Fixed Votes: 0
Labels: None


 Description   

If MaxScale is started with a threads parameter of less than one, MaxScale will start but will log the following message to the message log:

2015-10-31 06:55:37   MaxScale started with -1 server threads.

This should be detected and logged that an invalid value is used. - And MaxScale process should not be started if less than one is passed for threads parameter



 Comments   
Comment by Dipti Joshi (Inactive) [ 2015-11-02 ]

markus makela, johan.wikman Should MaxScale be not started in case of thread count parameter of -1 or does it start with a default number of threads ?

Thanks
Dipti

Comment by markus makela [ 2015-11-02 ]

It shouldn't start at all.

Comment by Johan Wikman [ 2015-11-02 ]

A general policy regarding configuration issues is needed.

  • What kind of errors should prevent maxscale from starting.
  • What kind of errors should cause a warning being logged and maxscale starting with some default behaviour.
  • What kind of errors should be ignored with a notice being logged.

As far as the threads issue is concerned a reasonable approach would be:

  • If the argument is a positive integer less than or equal to the number of cores, then that many threads are used.
  • If the argument is a positive integer larger than the number of cores, then a warning is logged and as many threads as there are cores is used.
  • If the argument is 0, then as many threads as there are cores is used.
  • If the threads entry is missing, then we behave as if 0 has been specified.
  • Otherwise an error is logged and maxscale fails to start.
Generated at Thu Feb 08 03:59:16 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.