/*! 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.
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)
This is part of implementation of https://github.com/codership/Engineering/wiki/Foreign_Key_Optimization_Combined Currently (v25) wsrep_key_type looks as follows:
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:
where
WSREP_KEY_REFERENCE
will stand for "strictly shared" andWSREP_KEY_UPDATE
- for "semi-exclusive" (notice that both "strictly shared" and "semi-exclusive" were themselves very poorly chosen terms for lack of better ideas)