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

83 Commits

Author SHA1 Message Date
Teemu Ollakka
80ca03daaf Implemented SR transaction rollback. 2018-07-10 14:01:41 +03:00
Teemu Ollakka
6f68c70d37 Interface changes required to store and remove fragments from high
priority context.
2018-07-09 18:12:48 +03:00
Teemu Ollakka
958a916b25 * Don't set ordering meta data for replaying transaction
* Renamed transaction prepare_for_fragment_ordering() to
  prepare_for_ordering()
2018-07-09 13:23:16 +03:00
Teemu Ollakka
6aa6b6f50a Provider write set handle and meta data for high priority commit
The write set handle and meta data are needed for SR transactions
where the commit context is not known when the transaction starts.
The passed handle and meta data can be set through client_state
prepare_for_ordering() call before performing commit.
2018-07-09 13:02:13 +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
2ac13100f7 Refactored storage service out of client service interface. 2018-07-07 18:06:37 +03:00
Teemu Ollakka
a8be09161c Replaced replicating mode with local.
The intended purpose for local mode was local storage access without
entering replication hooks. However, the same can be achieved with
high priority mode. Removed replicating mode and use local instead to
denote locally processing clients.
2018-07-07 12:01:14 +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
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
Teemu Ollakka
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
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
fcefe9f03b Provide additional provider error status. Fixed IST handling. 2018-07-05 11:31:47 +03:00
Teemu Ollakka
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
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
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
Teemu Ollakka
db18e91c42 Implemented client last_written_gtid, sync_wait 2018-06-30 07:44:09 +03:00
Teemu Ollakka
a4f5997045 Client state history, fixed races in server state, logging improv 2018-06-28 11:56:28 +03:00
Teemu Ollakka
cad9176474 TOI replicating and applying codepaths 2018-06-25 09:28:51 +03:00
Teemu Ollakka
8f0e112c47 Renamed invalid to undefined. More utility functions. 2018-06-21 16:50:44 +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
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
Teemu Ollakka
60fb119fa1 Cleaned up client_state interface. 2018-06-18 18:55:38 +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
03043d3f25 Removing client_state dependency from client_service. 2018-06-18 10:21:02 +03:00
Teemu Ollakka
af3119a58b Removed ostream include from public API headers. 2018-06-17 13:55:37 +03:00
Teemu Ollakka
0dac901b39 Improved client state documentation. 2018-06-17 11:12:20 +03:00
Teemu Ollakka
ef4baa9f9d Renamed server_context to server_state. 2018-06-17 10:07:48 +03:00
Teemu Ollakka
790c2bec4e Renamed transcation_context to transaction 2018-06-17 10:04:00 +03:00
Teemu Ollakka
dd28b173ab Renamed client_context to client_state. 2018-06-17 10:00:13 +03:00