mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-28 20:02:00 +03:00
Enable DBMS initialization from applying codepath
In general the provider might not guarantee that after joining to replication group, the first applied event is view event. Made init_initialized_ atomic and check it also from applying codepath. If the DBMS is not yet initialized when applying the first event, change state to initializing and wait for DBMS initialization completion. Notes: - Allow connected -> initializing state change. - Handle bootstrap_view in mock_connect to make server state synced for tests.
This commit is contained in:
@ -278,6 +278,14 @@ namespace wsrep
|
||||
1,
|
||||
members);
|
||||
server_state::on_connect(bootstrap_view);
|
||||
server_state::initialized();
|
||||
wsrep::mock_client cs(*this, wsrep::client_id(0),
|
||||
wsrep::client_state::m_high_priority);
|
||||
wsrep::mock_high_priority_service hps(*this, &cs, false);
|
||||
server_state::on_view(bootstrap_view, &hps);
|
||||
BOOST_REQUIRE(state() == wsrep::server_state::s_joined);
|
||||
server_state::on_sync();
|
||||
BOOST_REQUIRE(state() == wsrep::server_state::s_synced);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user