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

380 Commits

Author SHA1 Message Date
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
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
e876418ed3 * Renamed client service rollback() to bf_rollback() to better
describe its purpose.
* Raise deadlock error for BF aborted transaction in after_statement()
  call if the error is not set yet.
2018-07-06 15:42:03 +03:00
5ef2c956a9 Added a separate call to notify the client thread about completion
of background rollback. The separate call is necessary as all of
the resources may not have been released before the execution
reaches after_rollback() call and background rollbacker needs
to notify the client thread after all is complete.
2018-07-05 17:42:38 +03:00
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
fcefe9f03b Provide additional provider error status. Fixed IST handling. 2018-07-05 11:31:47 +03:00
b3de50fa05 Implemented convenience methods to desync/pause, resume/resync. 2018-07-04 18:12:42 +03:00
2668d85ebf Set state to s_must_abort when cert results conn failed. 2018-07-04 16:12:58 +03:00
a7f8728c12 After applying call, BF abort fixes
* Added after applying call for high priority threads in order to
  avoid client mode complexity in after_statement() call and
  make high prio transaction cleanup possible
* Mask connection failed error with deadlock error if provider
  returns connection failed and the transaction was BF aborted
2018-07-04 14:28:54 +03:00
4d59ade77b Always call provider bf_abort for active transactions
in transaction::bf_abort().

Check if the state is s_must_abort before changing the state to
s_must_abort when entering a critical section.
2018-07-04 08:39:20 +03:00
622b6583a2 Ignore TOI applying errors for now. 2018-07-03 21:29:35 +03:00
b9532e6497 Return provider status from set options. 2018-07-03 16:33:14 +03:00
4e8dfca3f1 Initial RSU implementation. 2018-07-03 12:37:22 +03:00
c552d944ed Deprecated sst_transferred(), always use sst_received() 2018-07-03 10:20:36 +03:00
e6d78c380d Pass ws_meta to high priority service apply_toi 2018-07-03 08:58:25 +03:00
3632e7823c Pass high_priority_service instead of void ptr for provider methods. 2018-07-03 07:48:35 +03:00
004244d203 Fixed dbsim SST issues. 2018-07-02 19:17:38 +03:00
635eaf4c29 Refactored high priority service out of client service. 2018-07-02 18:22:24 +03:00
658a84a7d4 Fixed BF abort in sync rollback mode.
* Pass condition variable for client_state
* Notify all cond waiters when changing the transcation status to
  aborted
* Wait for aborting transaction state aborted in before_command
2018-07-02 10:09:48 +03:00
db18e91c42 Implemented client last_written_gtid, sync_wait 2018-06-30 07:44:09 +03:00
3d2af88428 Propagate incoming address to provider. 2018-06-29 17:46:11 +03:00
c35f59cb5b Deal with init before SST case. 2018-06-29 17:02:35 +03:00
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
666eccf463 Allow connected - connected server state transition.
This will happen regularily when receiving several consequent
non-prim views.
2018-06-28 15:41:18 +03:00
d46c5a6e38 Fixes to server state management. 2018-06-28 14:50:01 +03:00
a4f5997045 Client state history, fixed races in server state, logging improv 2018-06-28 11:56:28 +03:00
203dd2875a Deal with desyncs in on_sync() call. 2018-06-27 16:15:09 +03:00
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
b1a374a9ba Fixed pause/desync logic. Allow concurrent callers to desync,
this should be dealt with the provider. However, only one
thread is allowed to call pause at the time to keep track
of implicit desyncs when pausing the provider.
2018-06-26 13:42:42 +03:00
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
bd0ba5b01d Fixed key conversion in wsrep_provider_v26::enter_toi() 2018-06-26 09:13:56 +03:00
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
1e03ae5b05 Enter and leave commit order with rollback fragment. 2018-06-25 19:12:19 +03:00
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
cad9176474 TOI replicating and applying codepaths 2018-06-25 09:28:51 +03:00
6a369a5d0e Fix for case where joiner shifts directly to synced state. 2018-06-24 15:49:12 +03:00
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
1f6a6db1e9 * Fixes to SST time server state management
* Logging tweaks
* Boolean to tune behavior on exception
2018-06-22 13:03:12 +03:00
8f0e112c47 Renamed invalid to undefined. More utility functions. 2018-06-21 16:50:44 +03:00
81ac78913a Initial implementation of client_state TOI mode. 2018-06-21 11:45:18 +03:00
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
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
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
779f84e5df Made client_service, transaction independent of provider.
Provider may not be loaded when client_service and
transaction are constructed.
2018-06-19 14:54:58 +03:00
5c3c972947 Provide access to native wsrep API handle. 2018-06-19 09:41:04 +03:00
0e4c7f16a9 Pass ws_handle as const reference to provider replay() 2018-06-19 09:36:15 +03:00
d1a1e298e9 Removed wsrep_api.h dependency from view.hpp 2018-06-18 20:39:25 +03:00
60fb119fa1 Cleaned up client_state interface. 2018-06-18 18:55:38 +03:00
cf231bdf2d Refactored server_service out of server_state. 2018-06-18 17:45:24 +03:00
ef5751943d Refactored most of the server_state interface into server_service
abstract interface.
2018-06-18 16:52:41 +03:00