[MDEV-25742] Proposition to add support for multi commands/scripts execution for the wsrep_notify_cmd parameter Created: 2021-05-20  Updated: 2021-05-20  Resolved: 2021-05-20

Status: Closed
Project: MariaDB Server
Component/s: Configuration, Galera, Replication, Scripts & Clients
Fix Version/s: N/A

Type: Task Priority: Trivial
Reporter: Tymoteusz Blazejczyk Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: Galera, mysqld, notifications, replication, script, server


 Description   

Current implementation of the wsrep_notify_cmd parameter and the --wsrep-notify-command command line argument support only a single command/script implementation of execution.

Proposition is to add support for adding multi commands/scripts to the wsrep_notify_cmd parameter for example:

  • provided as a list of commands/scripts separated by commas , like wsrep_notify_cmd=script1,script2,script3 or --wsrep-notify-command="script1,script2,script3"
  • multi command line arguments invocation? like --wsrep-notify-command="script1" --wsrep-notify-command="script2" --wsrep-notify-command="script3"
  • multi entries in a single configuration file? (separate rows of multi wsrep_notify_cmd parameters
  • join wsrep_notify_cmd parameter from separated configuration files?

Separate only by commas should be enough. This will allow to call N registered commands/scripts. Like in the software observer pattern.

It seems that the internal implementation of the mysqld should split the wsrep_notify_cmd parameter, simple loop over it and call each command/script separately. Maybe better will be to fork each script/command and join them together after the for loop. This will preserve the default behavior that invocation of the command/script block node (warning section).

Original discussion: https://github.com/MariaDB/mariadb-docker/issues/28#issuecomment-844793730



 Comments   
Comment by Daniel Black [ 2021-05-20 ]

From discussion:

"If a user wants their own notification script as well as what you what you develop, they can wrap it in a script themselves. If really needed its a rather simple shell script to fan out an[d] reap, lets not burden the server the the added complexity."

Generated at Thu Feb 08 09:40:01 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.