File bsc#1189680-cancel_token_hold_on_retransmit-option.patch of Package corosync.22097
diff -Naur a/exec/totemconfig.c b/exec/totemconfig.c
--- a/exec/totemconfig.c 2019-07-30 15:26:39.000000000 +0300
+++ b/exec/totemconfig.c 2021-08-24 18:53:30.186343450 +0300
@@ -78,6 +78,7 @@
#define RRP_PROBLEM_COUNT_THRESHOLD_MIN 2
#define RRP_AUTORECOVERY_CHECK_TIMEOUT 1000
#define BLOCK_UNLISTED_IPS 1
+#define CANCEL_TOKEN_HOLD_ON_RETRANSMIT 0
#define DEFAULT_PORT 5405
@@ -133,6 +134,8 @@
return &totem_config->miss_count_const;
if (strcmp(param_name, "totem.block_unlisted_ips") == 0)
return &totem_config->block_unlisted_ips;
+ if (strcmp(param_name, "totem.cancel_token_hold_on_retransmit") == 0)
+ return &totem_config->cancel_token_hold_on_retransmit;
return NULL;
}
@@ -293,6 +296,9 @@
totem_volatile_config_set_boolean_value(totem_config, "totem.block_unlisted_ips", deleted_key,
BLOCK_UNLISTED_IPS);
+
+ totem_volatile_config_set_boolean_value(totem_config, "totem.cancel_token_hold_on_retransmit",
+ deleted_key, CANCEL_TOKEN_HOLD_ON_RETRANSMIT);
}
static int totem_volatile_config_validate (
diff -Naur a/exec/totemsrp.c b/exec/totemsrp.c
--- a/exec/totemsrp.c 2019-07-30 15:26:39.000000000 +0300
+++ b/exec/totemsrp.c 2021-08-24 18:49:00.069047413 +0300
@@ -4097,7 +4097,8 @@
transmits_allowed = fcc_calculate (instance, token);
mcasted_retransmit = orf_token_rtr (instance, token, &transmits_allowed);
- if (instance->my_token_held == 1 &&
+ if (instance->totem_config->cancel_token_hold_on_retransmit &&
+ instance->my_token_held == 1 &&
(token->rtr_list_entries > 0 || mcasted_retransmit > 0)) {
instance->my_token_held = 0;
forward_token = 1;
diff -Naur a/include/corosync/totem/totem.h b/include/corosync/totem/totem.h
--- a/include/corosync/totem/totem.h 2019-07-30 15:26:39.000000000 +0300
+++ b/include/corosync/totem/totem.h 2021-08-24 18:49:00.069047413 +0300
@@ -193,6 +193,8 @@
unsigned int block_unlisted_ips;
+ unsigned int cancel_token_hold_on_retransmit;
+
void (*totem_memb_ring_id_create_or_load) (
struct memb_ring_id *memb_ring_id,
const struct totem_ip_address *addr);
diff -Naur a/man/corosync.conf.5 b/man/corosync.conf.5
--- a/man/corosync.conf.5 2019-07-30 15:26:39.000000000 +0300
+++ b/man/corosync.conf.5 2021-08-24 18:49:00.073047431 +0300
@@ -529,6 +529,19 @@
The default value is yes.
+.TP
+cancel_token_hold_on_retransmit
+Allows Corosync to hold token by representative when there is too much
+retransmit messages. This allows network to process increased load without
+overloading it. Used mechanism is same as described for
+.B hold
+directive.
+
+Some deployments may prefer to never hold token when there is
+retransmit messages. If so, option should be set to yes.
+
+The default value is no.
+
.PP
Within the
.B logging