1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-04-29 09:56:42 +03:00

58 Commits

Author SHA1 Message Date
Teemu Ollakka
ae734a33f8 Fixed compilation errors picked up by travis clang builds 2019-01-19 18:08:49 +02:00
Teemu Ollakka
0441746368 codership/wsrep-lib#44 Provider name, version and vendor getters
Added methods to get provider name, version and vendor strings
into wsrep::provider interface. Implementations for v26 and mock
providers.
2019-01-02 12:11:26 +02:00
Teemu Ollakka
e9bb552096 codership/wsrep-lib#34 Provided a method to interrupt state waiters
Intruduced server_state::interrupt_state_waiters() to interrupt
all waiters inside server_state::wait_until_state(). This mechanism
is needed when an error is encountered during state change processing
and waiting threads may need to be interrupted to check and handle
the error condition.

Made server_state::wait_until_state() to throw exception if the
wait was interrupted and the new server state is either disconnecting
or disconnected, which usually indicates error condition.
2018-12-20 19:35:31 +02:00
Alexey Yurchenko
05013c8d44 Support for UPDATE certification key type. 2018-12-15 19:59:11 +02:00
Alexey Yurchenko
fd07ff12e4 Refs codership/wsrep-API#21 added support for the IMPLICIT_DEPS WS flag 2018-11-28 18:07:08 +01:00
Alexey Yurchenko
8ffad51822 Fixed the definition of the encryption callback 2018-11-28 18:07:08 +01:00
Alexey Yurchenko
3950ea3027 Refs codership/wsrep-lib#18 Small fixups
- fixed node ID assertion in on_connect() method,
   fixed "sanity checks" to allow reconnection to primary component
 - fixed code duplication in on_view() method
2018-11-23 23:27:09 +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
a942811ce7 User defined logger callback implementation
Added static wsrep::log::logger_fn() method to allow user to
provide logger callback.
2018-11-07 21:45:52 +02:00
Daniele Sciascia
ed7c4d7410 Add prepare flag to wsrep::provider::flag 2018-10-24 11:35:28 +03:00
Teemu Ollakka
c0c977f9ab Added GPLv2 licence and copyright headers. 2018-10-15 15:14:22 +03:00
mkaruza
94174b06e6 codership/galera-bugs#165 Update to wsrep encryption API
Update wsrep-API/v26 submodule. Cleanup. Empty callback handler for encrypt.
2018-10-11 20:40:13 +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
80ca03daaf Implemented SR transaction rollback. 2018-07-10 14:01:41 +03:00
Teemu Ollakka
3ff322386c Added must_exit boolean flag to high_priority_service interface
This is needed to allow slave threads to exit processing loop
if requested by the DBMS.
2018-07-06 16:18:59 +03:00
Teemu Ollakka
fcefe9f03b Provide additional provider error status. Fixed IST handling. 2018-07-05 11:31:47 +03:00
Teemu Ollakka
b9532e6497 Return provider status from set options. 2018-07-03 16:33:14 +03:00
Teemu Ollakka
3632e7823c Pass high_priority_service instead of void ptr for provider methods. 2018-07-03 07:48:35 +03:00
Teemu Ollakka
635eaf4c29 Refactored high priority service out of client service. 2018-07-02 18:22:24 +03:00
Teemu Ollakka
db18e91c42 Implemented client last_written_gtid, sync_wait 2018-06-30 07:44:09 +03:00
Teemu Ollakka
3d2af88428 Propagate incoming address to provider. 2018-06-29 17:46:11 +03:00
Teemu Ollakka
0851970c53 Bootstrap server service, fixes to server state management
* Added bootstrap service call to do DBMS side bootstrap operations
  during the cluster bootstrap.
* Added last_committed_gtid() to provider interface
* Implemented wait_for_gtid() provider call
* Pass initial position to the server state
2018-06-29 11:54:33 +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
2a53198f5c Protocol version and connected gtid
* Propagate server max protocol version to provider init options
* Store gtid from connected call to make cluster id and the connect
  position available
2018-06-26 11:34:05 +03:00
Teemu Ollakka
bd0ba5b01d Fixed key conversion in wsrep_provider_v26::enter_toi() 2018-06-26 09:13:56 +03:00
Teemu Ollakka
cad9176474 TOI replicating and applying codepaths 2018-06-25 09:28:51 +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
1f6a6db1e9 * Fixes to SST time server state management
* Logging tweaks
* Boolean to tune behavior on exception
2018-06-22 13:03:12 +03:00
Teemu Ollakka
81ac78913a Initial implementation of client_state TOI mode. 2018-06-21 11:45:18 +03:00
Teemu Ollakka
3a8861b26b * Moved causal reads/gtid wait into server state interface
* Changed undefined seqno to be defined as -1
2018-06-21 10:37:55 +03:00
Teemu Ollakka
ef0fb72b73 * Added size exceeded error code
* Return provider status from selected client_state calls
* Added more methods to provider interface
2018-06-20 19:44:20 +03:00
Teemu Ollakka
5c3c972947 Provide access to native wsrep API handle. 2018-06-19 09:41:04 +03:00
Teemu Ollakka
0e4c7f16a9 Pass ws_handle as const reference to provider replay() 2018-06-19 09:36:15 +03:00
Teemu Ollakka
d1a1e298e9 Removed wsrep_api.h dependency from view.hpp 2018-06-18 20:39:25 +03:00
Teemu Ollakka
cf231bdf2d Refactored server_service out of server_state. 2018-06-18 17:45:24 +03:00
Teemu Ollakka
ef5751943d Refactored most of the server_state interface into server_service
abstract interface.
2018-06-18 16:52:41 +03:00
Teemu Ollakka
ef4baa9f9d Renamed server_context to server_state. 2018-06-17 10:07:48 +03:00
Teemu Ollakka
dd28b173ab Renamed client_context to client_state. 2018-06-17 10:00:13 +03:00
Teemu Ollakka
ad0617c660 Using javadoc style for doc comments 2018-06-16 15:23:14 +03:00
Teemu Ollakka
47cb8e604c Renamed client context m_applier to m_high_priority 2018-06-16 15:08:31 +03:00
Teemu Ollakka
0b6e49474f Tests and fixes for replaying. 2018-06-14 15:00:40 +03:00
Teemu Ollakka
9e8e6d47ba * Unit test for SR 2PC
* Removed redundant data class
* Introduced const_buffer and mutable_buffer
* Transaction context and client context interface refactoring
2018-06-12 18:04:32 +03:00
Teemu Ollakka
d9d41a4787 * Fixed wrong error code returned from client_context::before_command
* Fixed raw depends_on assignment from native to wsrep::seqno
* More debug logging
2018-06-12 13:17:01 +03:00
Teemu Ollakka
d6f185c278 Refactored provider specific code out of server_context.cpp 2018-06-12 10:52:56 +03:00
Teemu Ollakka
97d9f93648 Refactored seqno and id classes out of provider.hpp 2018-06-12 10:20:58 +03:00
Teemu Ollakka
e18c9d597f * Unit test for idle client BF abort.
* Fixes to seqno conversion between provider and provider library.
* Server context applying side fixes.
2018-06-10 19:27:09 +03:00
Teemu Ollakka
2619615e02 Fixed problems with server_context unit tests.
Added WITH_ASAN and WITH_TSAN options, enabled unit tests by default.
2018-06-10 15:31:41 +03:00
Teemu Ollakka
ca615fcbd8 Provider abstraction code compiles. 2018-06-10 12:46:42 +03:00
Teemu Ollakka
e74b214c9c Provider type abstraction, partially completed. 2018-06-09 23:28:02 +03:00