1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-10-29 19:09:23 +03:00

MDEV-31517 Wrong variable name in the configuration leads Galera to

think SST/IST failed, at next restart will request a full SST

This patch fixes an unwanted behavior of a Galera cluster node when
Server startup fails because of an error in configuration file: after
the failure full SST is requested at the next Server startup even
though full SST is not needed (MDEV-31517).

If Server startup fails because of a configuration error, this patch
ensures that Galera state of the failing node remains unchanged. This
avoids full SST at the next Server restart.

This fix consists of three patches for the following components:

1) Server,
2) WSREP library,
3) Galera.
This commit is contained in:
Pekka Lampio
2025-10-21 12:01:53 +03:00
parent 3965d83968
commit fdae687f1d
2 changed files with 8 additions and 1 deletions

View File

@@ -625,6 +625,10 @@ namespace wsrep
wsrep::mutex& mutex() { return mutex_; }
void disable_node_reset() {
disable_node_reset_ = true;
}
protected:
/** Server state constructor
*
@@ -682,6 +686,7 @@ namespace wsrep
, previous_primary_view_()
, current_view_()
, rollback_event_queue_()
, disable_node_reset_()
{ }
private:
@@ -764,6 +769,7 @@ namespace wsrep
wsrep::view previous_primary_view_;
wsrep::view current_view_;
std::deque<wsrep::transaction_id> rollback_event_queue_;
bool disable_node_reset_;
};
static inline const char* to_c_string(

View File

@@ -813,7 +813,8 @@ catch (const wsrep::runtime_error& e)
wsrep::log_error() << "sst_received failed: " << e.what();
if (provider_)
{
provider_->sst_received(wsrep::gtid::undefined(), -EINTR);
provider_->sst_received(wsrep::gtid::undefined(),
(disable_node_reset_ ? -ECANCELED : -EINTR));
}
return 1;
}