1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-07-03 16:22:35 +03:00
Commit Graph

19 Commits

Author SHA1 Message Date
4f1c201c9d Initial implementation of the status interface reporter object. 2021-09-05 15:42:54 +03:00
f271ad0c6e Reset client_state toi_mode to m_undefined after RSU
Client state end_rsu() didn't reset toi_mode to m_undefined,
which caused an assertion when NBO was started after RSU.

As a fix, reset toi_mode to m_undefined in end_rsu() after
changing mode.
2021-04-08 17:08:04 +03:00
6752a4504f Address review comments
* Added unit tests for transaction::xa_detach() and
  transaction::xa_replay()
* Added unit tests for wsrep::xid
* Fixed minor issues pointed out by reviewer
2020-10-26 14:22:22 +01:00
1267e29b8f Implementation of client_state NBO operations.
- Implemented calls to enter and leave NBO phase one and two
- Extended client_state mode checking to include m_nbo
- Changed client_state state and mode change sanity checks to
  print a warning and assert() instead of throwing exceptions
  to be more graceful in release builds.
2019-12-08 12:52:36 +02:00
45c64735d6 Added unit test for TOI operations 2019-12-08 12:52:36 +02:00
9b25cebdf1 codership/wsrep-lib#117 Fixed empty vector access.
Access to empty vector by using operator[] may cause stdlib++
assertions to fail. Replaced the vector data access to use data()
method which is valid operation even if the vector is empty.

Added unit test to reproduce assertion with empty mutable_buffer access.

Added -D_GLIBCXX_ASSERTIONS preprocessor option to debug builds
to catch standard library misuse.

Added gcc 8 and gcc9 into travis build matrix.
2019-12-05 14:27:35 +02:00
b73df49cff basic XA unit tests 2019-10-16 10:15:55 +02:00
eb4cf86c1e Implemented thread service support.
Added a wsrep::thread_service interface to allow application to
inject instrumented thread, mutex and condition variable implementation
for provider.

The interface is defined in include/wsrep/thread_service.hpp.
Sample implementation is provided in dbsim/db_threads.[h|c]pp.

This patch will also clean up some remaining dependencies to
wsrep-API compilation units so that the dependency to wsrep-API
is header only. This will extending the provider support to
later wsrep-API versions.
2019-10-14 09:30:15 +03:00
36dbb37645 codership/wsrep-lib#35 Rewrote member_index() to use iterators
Use iterators for scanning members vector in order to avoid
issues with integer signedness and range checks. The vector is
usually rather small and not in hot codepath, so performance
is here not an issue.

Added unit test for member_index() method.
2018-12-15 13:46:42 +00:00
cf434f3da5 Fix make test
Fixed `make test` so that it runs unit tests.

codership/wsrep-lib#7
2018-10-19 12:13:10 +03:00
5e5906d598 Prefixed cmake WITH_ definitions with WSREP_LIB_ to avoid collisions
with superproject definitions.

Avoid using client_service::do_2pc() in before_commit() to
determine if 2pc is actually happening, will use transaction
states to deduce that. client_service::do_2pc() should be deprecated.

Fixed a compiler warning in db_high_priority_service.cpp.
2018-10-12 16:04:52 +03:00
2ac13100f7 Refactored storage service out of client service interface. 2018-07-07 18:06:37 +03:00
635eaf4c29 Refactored high priority service out of client service. 2018-07-02 18:22:24 +03:00
790c2bec4e Renamed transcation_context to transaction 2018-06-17 10:04:00 +03:00
dd28b173ab Renamed client_context to client_state. 2018-06-17 10:00:13 +03:00
ca6286d8b2 Use provider for replaying in mock client_context instead of
calling server context apply directly.
2018-06-14 12:41:34 +03:00
37c56cb5ec Moved 2PC tests into separate compliation unit. 2018-06-13 12:22:03 +03:00
461247adc1 Renamed unit test doubles 2018-06-13 11:23:48 +03:00
174ecfe578 Moved tests under separate directory. 2018-06-12 18:17:32 +03:00