1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-04-21 08:25:53 +03:00

31 Commits

Author SHA1 Message Date
Teemu Ollakka
76335a3042 Added test case for desync-pause-resume-resync. 2018-12-20 19:35:31 +02:00
Teemu Ollakka
728eaa80b5 Added test cases for donor transitions.
Replaced all references to provider_ in server_state methods to
provider() call which is virtual and can be overridden by test classes.
Provider pointer may not be initialized during unit tests yet.
2018-12-20 19:35:31 +02:00
Teemu Ollakka
e5e5d409ed Test case for init first succesfull SST. 2018-12-20 19:35:31 +02:00
Teemu Ollakka
a4ea80e11a Added test cases for error/shutdown in joined and donor states. 2018-12-20 19:35:31 +02:00
Teemu Ollakka
7cd0656990 Allow server_state joiner - disconnecting transition.
Transition joiner - disconnecting may happen when the joiner failed
to receive SST succesfully. Because the system is at undefined state
at this point, skip most of the processing in sst_received()
and return control to caller after notifying the provider about
failure.
2018-12-20 19:35:31 +02:00
Teemu Ollakka
e81c66cd59 Fixed assertion on server_state connected - disconnecting transition
Transition from server_state connected state to disconnecting must
be allowed to deal with errors during server startup.

Added SST first test cases for server_state transitions:
* Successful join via SST
* Error in connect state
* Error in joiner state
2018-12-20 19:35:31 +02:00
Teemu Ollakka
1776537765 codership/wsrep-lib#34 Handle sync-disconnected-sync for init first
Handle init first case where state is cycled from synced to
disconnected and back synced without SST.
2018-12-20 19:35:31 +02:00
Teemu Ollakka
76424ad515 codership/wsrep-lib#34 Unit test for sync-disconnect-sync
Added unit test for sync-disconnect-sync transition without SST.
2018-12-20 19:35:31 +02:00
Teemu Ollakka
bf83907f38 codership/wsrep-lib#34 Moved cluster_id, bootstrap_view into base fixture
Made cluster_id, bootstrap_view members of server_fixture_base and
initialize them in serveri_fixture_base constructor to reduce typing
in test cases.
2018-12-20 19:35:31 +02:00
Alexey Yurchenko
ea9971d54b - Initialize member cluster ID only on connection to cluster and forget
it on disconnect.
 - Don't rely on own index from the view because the view may come from
   another member (IST/SST), instead always determine own index from own ID.

Refs codership/wsrep-lib#13
2018-11-09 00:42:05 +02:00
Teemu Ollakka
a9abb3a80a Extracted mock_server_service out of mock_server_state. 2018-10-17 12:07:41 +03:00
Teemu Ollakka
c0c977f9ab Added GPLv2 licence and copyright headers. 2018-10-15 15:14:22 +03:00
Teemu Ollakka
86472ee420 Implemented SR transaction rollbacking during configuration changes.
SR tranasctions are BF aborted or rolled back on primary view
changes according to the following rules:
* Ongoing local SR transactions are BF aborted if the processing
  server is not found from the current view.
* All remote SR transactions whose origin server is not included in the
  current view are rolled back.
2018-07-14 16:11:13 +03:00
Teemu Ollakka
ddc6c6495b Made client_id, transaction_id constructors explicit. 2018-07-11 15:00:31 +03:00
Teemu Ollakka
7c424d8337 Fixes to local streaming replication processing. 2018-07-08 15:27:49 +03:00
Teemu Ollakka
635eaf4c29 Refactored high priority service out of client service. 2018-07-02 18:22:24 +03:00
Teemu Ollakka
c35f59cb5b Deal with init before SST case. 2018-06-29 17:02:35 +03:00
Teemu Ollakka
fd9cf87141 * Return provider status from provider connect
* Call to get server status variables along with provider variables
* Deal with intermediate non-prims
2018-06-27 15:36:52 +03:00
Teemu Ollakka
d3821d88a5 Partial implementation of methods needed for SST.
* server_state desync()/resync() and pause()/resume()
* Fixes to server_state state machine
2018-06-24 14:35:47 +03:00
Teemu Ollakka
bf7dad6815 Added open(), close(), cleanup() methods to client_state.
Depending on the DBMS client session allocation strategy the
client id may or may not be available when the client_session
is constructed, therefore there should be a method to assign
an id after construction. Close/cleanup methods were added to
clean up open transactions appropriately.
2018-06-20 10:07:55 +03:00
Teemu Ollakka
03043d3f25 Removing client_state dependency from client_service. 2018-06-18 10:21:02 +03:00
Teemu Ollakka
ef4baa9f9d Renamed server_context to server_state. 2018-06-17 10:07:48 +03:00
Teemu Ollakka
790c2bec4e Renamed transcation_context to transaction 2018-06-17 10:04:00 +03:00
Teemu Ollakka
dd28b173ab Renamed client_context to client_state. 2018-06-17 10:00:13 +03:00
Teemu Ollakka
47cb8e604c Renamed client context m_applier to m_high_priority 2018-06-16 15:08:31 +03:00
Teemu Ollakka
256000f934 Refactored client_service interface out of client_context 2018-06-14 19:44:38 +03:00
Teemu Ollakka
ca6286d8b2 Use provider for replaying in mock client_context instead of
calling server context apply directly.
2018-06-14 12:41:34 +03:00
Teemu Ollakka
a8ab9c6dbd SR applying implementation, unit tests. 2018-06-14 11:14:40 +03:00
Teemu Ollakka
39c9ef8a63 Tests for transaction context, server context state strings. 2018-06-13 17:24:37 +03:00
Teemu Ollakka
461247adc1 Renamed unit test doubles 2018-06-13 11:23:48 +03:00
Teemu Ollakka
174ecfe578 Moved tests under separate directory. 2018-06-12 18:17:32 +03:00