Coder Social home page Coder Social logo

wsrep-api's People

Contributors

ayurchen avatar philip-galera avatar sciascid avatar sjaakola avatar temeo avatar tuladhar avatar vasild avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wsrep-api's Issues

API v26 - expand enum wsrep_key_type to contain 4 members

This is part of implementation of https://github.com/codership/Engineering/wiki/Foreign_Key_Optimization_Combined
Currently (v25) wsrep_key_type looks as follows:

/*! Key type:
 *  EXCLUSIVE conflicts with any key type
 *  SEMI      reserved. If not supported, should be interpreted as EXCLUSIVE
 *  SHARED    conflicts only with EXCLUSIVE keys */
typedef enum wsrep_key_type
{
    WSREP_KEY_SHARED = 0,
    WSREP_KEY_SEMI,
    WSREP_KEY_EXCLUSIVE
} wsrep_key_type_t;

where WSREP_KEY_SEMI was intended to stand for "semi-exclusive" keys, but had to be hijacked to stand for "strictly shared" key type that was needed to solve customer's issues with collision on FKs. For the sake of preserving the API it was not renamed.

Final implementation of https://github.com/codership/Engineering/wiki/Foreign_Key_Optimization_Combined requires 4 key types. Since it involves changing the API we can adopt better, perhaps more intuitive IDs for the members.
This is the suggestion:

typedef enum wsrep_key_type
{
    WSREP_KEY_SHARED = 0,
    WSREP_KEY_REFERENCE,
    WSREP_KEY_UPDATE.
    WSREP_KEY_EXCLUSIVE
} wsrep_key_type_t;

where WSREP_KEY_REFERENCE will stand for "strictly shared" and WSREP_KEY_UPDATE - for "semi-exclusive" (notice that both "strictly shared" and "semi-exclusive" were themselves very poorly chosen terms for lack of better ideas)

sst_request_cb lacks application context pointer

SST request callback does not have application context pointer. This requires that the application state is contained in global variables.

Suggested fix: Add application context pointer in sst_request_cb callback type.

Support for XA transaction termination

Enhance wsrep api to support the following use case:
If the master of a prepared XA transaction fails, then it should be possible to terminate (commit or rollback) the transaction from another node in the cluster.
In order to do so, the application should be able to pass the necessary information to the provider so that a commit/rollback fragment can be sent on behalf of the failed master. The information consists of server and transaction ids.
One possible way to achieve this would be to add function with the following signature:

wsrep_status_t xa_recover(const wsrep_uuid_t*, wsrep_trx_id_t)

or

wsrep_status_t xa_recover(const wsrep_stid_t*)

xa_recover would be called before terminating the transaction through certify() or rollback().

Add assign_read_view() call

It is an optional call to inform provider about the read views (identified by GTID) used by application. Use case: snapshot isolation. Signature:

wsrep_status_t assign_read_view(wsrep_t* wsrep, wsrep_ws_handle_t* ws, const wsrep_gtid_t* rv);

Application passes read view ID to provider in rv. If rv == NULL provider uses the current internal value.

remove state from view callback and sst methods

There are completely unused state/state_len parameters in

  • wsrep_view_cb_t
  • wsrep_sst_donate_cb_t
  • sst_received

These unused parameters should be removed as there is no intended use for them now or in the future.

Extension to wsrep-API to display monitor states

Wsrep-API should be amended with an interface which could be used to show internal Galera monitor states.

This will be specific to Galera provider, and the interface can expose some Galera internals if necessary.

rename struct wsrep to struct wsrep_st

Struct wsrep will not allow using wsrep namespace in C++ code:

test.cpp:6:1: error: ‘namespace wsrep { }’ redeclared as different kind of symbol
 {
 ^
In file included from test.cpp:2:0:
wsrep_api.h:634:8: note: previous declaration ‘struct wsrep’
 struct wsrep {

Rename struct wsrep to struct wsrep_st to allow using namespace wsrep.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.