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

26 Commits

Author SHA1 Message Date
Teemu Ollakka
bd1a5c25a9 Remove provider position from ws_meta and view
Provider position clutters the public interface and is not
required by wsrep-API v26. Remove the position from ws_meta/view
classes and deal with it internally in custom providers.
2024-03-09 12:16:42 +02:00
Teemu Ollakka
41fee48c9e Squashed commit of the following:
commit 3b419aa6e2cced92c07c571116aad3d55cd1e7e4
Author: Teemu Ollakka <teemu.ollakka@galeracluster.com>
Date:   Sun Feb 19 10:29:34 2023 +0200

    Skip fetching config options if provider not loaded via wsrep-API

commit 044220cc067cbf74a956fa1a4476f6d873a78210
Author: Teemu Ollakka <teemu.ollakka@galeracluster.com>
Date:   Wed Jul 13 10:31:03 2022 +0300

    Operation context pointer for client state

commit eeb05a92384933dd026d5ca3c6f854510bb76eed
Author: Teemu Ollakka <teemu.ollakka@galeracluster.com>
Date:   Mon Jul 4 09:03:23 2022 +0300

    Add unit test log in gitignore

commit 92a04070fc0dc4f55dc0415442ed9003c29a9cf6
Author: Teemu Ollakka <teemu.ollakka@galeracluster.com>
Date:   Sun May 8 12:45:36 2022 +0300

    Added convenience method prev() to seqno

commit f83ca1917e50bfe29c3912ccd3a9989ead68378a
Author: Teemu Ollakka <teemu.ollakka@galeracluster.com>
Date:   Sun May 1 16:37:24 2022 +0300

    Pass victim context for provider on BF abort

    This change is needed for custom provider implementations to
    have a way to access the victim in the application context.

    Helper interface operation_context to pass caller context for
    service/provider callbacks in more type safe way.

commit 244eabe8cfcc86ca49981b0d8d081b740a967bda
Author: Teemu Ollakka <teemu.ollakka@galeracluster.com>
Date:   Wed May 25 07:39:43 2022 +0300

    Handle disconnecting state in on_sync()

    When disconnecting from the group, the sync event from the
    provider must not change the state back to synced.

commit ba8e23df0dfec71427aac0d35036f26d908b4995
Author: Teemu Ollakka <teemu.ollakka@galeracluster.com>
Date:   Tue Mar 22 17:43:52 2022 +0200

    Add provider position field to ws_meta and view

    Provider position is needed in coordinated recovery
    between application and provider. Pass the position
    info from provider to application to allow making
    it durable.

commit 53e60f64c953b252a47bc91e87b4131465b5f15f
Author: Teemu Ollakka <teemu.ollakka@galeracluster.com>
Date:   Sat Mar 19 14:45:57 2022 +0200

    Reset TOI meta after releasing total order in provider

    This is to keep the TOI meta available in case the provider
    implementation needs it.

commit bccb9997f29e94a2d5160d388454ace5f89efb6c
Author: Teemu Ollakka <teemu.ollakka@galeracluster.com>
Date:   Mon Jan 3 11:19:58 2022 +0200

    Fixed id ostream operator to print human readable ids

commit 6d0b37daafdb87975931b0bd95bb8ea821a4071e
Author: Teemu Ollakka <teemu.ollakka@galeracluster.com>
Date:   Wed Dec 15 16:37:45 2021 +0200

    Silence unused variable warning

commit 4b8616f3d13137d992b8b994baa48f2981238352
Author: Denis Protivensky <denis.protivensky@galeracluster.com>
Date:   Wed Dec 15 16:43:31 2021 +0300

    Fix provider loading in test for release builds

commit 6df17812d945a07a6f199e6fe83e287afbc28ed9
Author: Denis Protivensky <denis.protivensky@galeracluster.com>
Date:   Tue Dec 14 20:28:56 2021 +0300

    Introduce set_provider_factory() method for server_state

    This allows injecting an application allocated provider into
    server_state.

    After this virtual provider getter is unnecessary. Made the getter
    normal method and fixed unit tests accordingly.
2024-03-09 12:16:42 +02:00
Teemu Ollakka
d2f27babd6 Add lock argument to server_service::background_rollback()
This is to allow implementation to temporarily release the
lock if needed.
2023-04-16 19:12:26 +03:00
Alexey Yurchenko
4f1c201c9d Initial implementation of the status interface reporter object. 2021-09-05 15:42:54 +03:00
Daniele Sciascia
a17b65a25f Set server position after local certification failure
After a local certification failure, commit order is released without
the setting the current position in DBMS. Which results in diverging
positions between provider and DBMS, if clean shutdown happens right
after local certification failure.
This patch add method set_position() to server_service class. So that
wsrep-lib can instruct DBMS to set the current position after local
certification failure releases commit order.
2020-01-07 11:20:21 +01:00
Teemu Ollakka
f30d9c06ce Enhanced dbsim to store view and position in storage engine
Mimic real DBMS implementation by storing view and position
into storage engine.
2019-01-25 12:18:46 +02:00
Teemu Ollakka
a6b38d2428 codership/wsrep-lib#54 Service call to recover streaming appliers
Introduced server_service recover_streaming_appliers() interface
call which will be called in total order whenever streaming appliers
must be recovered. The call comes with two overloads, one which
can be called from client context (e.g. after SST has been received)
and the other from high priority context (e.g. view event handling).

The client context overload should be eventually be deprecated once
there is a mechanism to make provider signal that it has joined to
the cluster and will start applying events.
2019-01-21 17:00:08 +02:00
Teemu Ollakka
47263df442 Revert "codership/mariadb-wsrep#27 Galera cache encryption"
This reverts commit 7e9419e8111c3ca37d5e484282fe11a690eb2c6a.
2019-01-21 14:12:28 +02:00
mkaruza
7e9419e811 codership/mariadb-wsrep#27 Galera cache encryption
* Implemented encryption callback and enc_set_key
* Added pure virtual functions for encryption functionality
* Set enc key if provider was not loaded on time
2019-01-19 23:58:20 +01:00
Teemu Ollakka
89b3561ad8 Read recovered position from sst_received() after initialization
In general the position where the storage recovers after a SST
cannot be known untile the recovery process is over. This in turn
means that the position cannot be known when the server_state
sst_received() method is called. Worked around the problem by
introducing get_position() method into server service which
can be used to get the position from stable storage after SST
has completed and the state has been recovered.
2019-01-15 12:35:06 +02:00
Alexey Yurchenko
fb14883547 Recover current view from state after SST.
When member joins the group and needs to receive an SST it won't
receive the corresponding menbership view event because the SST
happens after the event and will already include the effects of
all events ordered before it. The view then must be recovered from
the received state.

Minor renames and cleanups.

References codership/wsrep-lib#18
2018-11-12 12:47:42 +02:00
Teemu Ollakka
c7e8bfbdb5 codership/wsrep-lib#13 Fix dbsim to deal with provider generated server id
Dbsim has internal map of server objects for SST simulation.
This was mapped using server_id, which is not available
anymore when server object is constructed. Changed the dbsim to
use server name instead for internal mapping.
2018-11-09 00:42:05 +02:00
Teemu Ollakka
c0c977f9ab Added GPLv2 licence and copyright headers. 2018-10-15 15:14:22 +03:00
Teemu Ollakka
21ae2c849e Pass pointer to high priority service as a parameter for log_view()
The pointer will pass applier context to log_view(), where it
can be used for stable storage access.
2018-07-15 19:00:10 +03:00
Teemu Ollakka
4cfb9b6413 Introduced adopt_transaction() for storage_service interface
A SR transaction must be adopted by a storage service instance
running in background rollbacker thread while it is aborting a
SR transaction.
2018-07-13 15:36:27 +03:00
Teemu Ollakka
8a1e76bcec Execution context switching for high priority service. 2018-07-09 11:35:20 +03:00
Teemu Ollakka
2ac13100f7 Refactored storage service out of client service interface. 2018-07-07 18:06:37 +03:00
Teemu Ollakka
d80a69fe90 Defined log_state_change() interface in server_service.
The interface method can be used to notify the DBMS implementation
about state changes in well defined order. The call will be done
under server_state mutex protection.
2018-07-05 12:45:22 +03:00
Teemu Ollakka
4e8dfca3f1 Initial RSU implementation. 2018-07-03 12:37:22 +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
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
ccf5c08c35 * Removed client_context from server_service::log_view() params
* Call log_view() from server_state view handler
2018-06-26 08:04:05 +03:00
Teemu Ollakka
4e152ee79d * Added applier side TOI commit order enter and leave
* Added cleanup_transaction() method to client_service in order to
  provide a way to make DBMS side cleanup when transaction
  is cleaned up
2018-06-25 14:09:19 +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
cf231bdf2d Refactored server_service out of server_state. 2018-06-18 17:45:24 +03:00