1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-04-19 21:02:17 +03:00

12 Commits

Author SHA1 Message Date
Teemu Ollakka
5ea78de6c2 Add support for custom provider implementation
- Add a set_provider_factory() method to server_state to allow
  injecting provider factory which will be called when the
  provider is loaded.

Other related changes:
- Implement to_string() helper method for id class.
- Fix id ostream operator human readable id printing.
- Pass victim client_service as an argument to provider::bf_abort()
  to allow passing victim context to custom provider.
- Implement prev() helper method for seqno class.
- Make server_state recover_streaming_appliers_if_not_recovered()
  public. In some recovery scenarios the method must be called outside
  of server_state internal code paths.
- Add storage_service requires_globals() method. The storage service
  implementation may override this to return false if changing to
  storage service context does not require store/reset globals.
- Change view final() to also require that the view status is not
  primary for the view to be final. Also change the method name to
  is_final() to avoid confusion with C++ final identifier.
- Fixes to server state handling in disconnecting and disconnected
  states.
- Keep TOI meta data over whole TOI critical section.

Co-authored-by: Denis Protivensky <denis.protivensky@galeracluster.com>
2025-01-14 16:51:26 +02:00
Teemu Ollakka
d1482feb32 Ensure that client_service::will_replay() is called.
Modified tests to verify that client_service::will_replay() is
called whenever it is determined that the transaction must replay.

Added a test to verify behavior when provider::commit_order_enter()
returns BF abort error.

Moved call to client_service::will_replay() into transaction::state()
to ensure that it is always called when shift to s_must_replay
happens.
2020-10-19 06:12:17 +03:00
Teemu Ollakka
6291f1bf16 Squashed memory leaks to get clean test run with ASAN enabled. 2019-12-08 12:52:36 +02:00
Alexey Yurchenko
0f676bd893 codership/wsrep-lib#104 Error voting support
- populate and pass real error description buffer to provider in case
   of applying error
 - return 0 from server_state::on_apply() if error voting confirmed
   consistency
 - remove fragments and rollback after fragment applying failure
 - always release streaming applier on commit or rollback
2019-07-15 03:48:55 +03:00
Teemu Ollakka
8c2daa7e3d Handle BF abort during fragment removal
Fragment removal for SR transaction is done in transaction context
to make it atomic. However, this means that if the BF abort arrives
during fragment removal, the transaction may be rolled back inside
client_service::remove_fragments(), and client_state::after_prepare()
is left in aborted state. This case was not handled in the
post condition checks of after_prepare().

Fixed assertion in after_prepare() and implemented unit test.
2019-02-15 12:09:49 +02:00
Teemu Ollakka
fccdad6ee9 Changed certification to happen in before_prepare()
Certification for commit fragments was changed to happen in
before_prepare in order to make GTID available for storage
engines in prepare phase.

Removed unused file src/wsrep-lib_test.cpp
2019-01-11 18:30:30 +02:00
Teemu Ollakka
c0c977f9ab Added GPLv2 licence and copyright headers. 2018-10-15 15:14:22 +03:00
Teemu Ollakka
ddc6c6495b Made client_id, transaction_id constructors explicit. 2018-07-11 15:00:31 +03:00
Teemu Ollakka
95dbab4c08 Made transaction streaming context private and provided accessor method. 2018-07-09 08:49:29 +03:00
Teemu Ollakka
7c424d8337 Fixes to local streaming replication processing. 2018-07-08 15:27:49 +03:00
Teemu Ollakka
af18a10a49 Removed is_autocommi() from client_service interface as it is not
quite useful as there might not be enough information for it
after the statement has been processed. Better to handle retrying
on DBMS side. Also removed after_statement_result enumeration and
return plain int from after_statement().
2018-07-06 19:48:48 +03:00
Teemu Ollakka
790c2bec4e Renamed transcation_context to transaction 2018-06-17 10:04:00 +03:00