Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Additionally lightweight client tx coordination [2] need to be applicable together with partition aware request mapping. Lets use simple approach at first time: if affinity meta mapping is found from cache - direct mode is used and proxy otherwise. Another words: if modified rows are belongs to only one node - direct mode is used.

Protocol changes:  if server side client request handler detects that PA feature supported it need to prepare PA structure (if possible) and send it back to the client.

Let`s consider the scope of use cases this improvement can be applied to:

...


  1. Code Block
    languagesql
    titleAll cases where calculations for colocation keys are requires additional data demand
    SELECT * FROM T WHERE col1 = ? AND col2 = (SELECT MIN(a) FROM T2);



  2. Code Block
    languagesql
    titleInsertion with explicit casts:
    INSERT INTO T (id, col2) VALUES(0, '100'::INTEGER);



  3. Code Block
    languagesql
    titleForms of INSERT INTO SELECT where condition is not covers all colocation columns
    INSERT INTO T SELECT * FROM T2 WHERE condition;


  4.  All forms of SELECT\DELETE\UPDATE\MERGE statements with IN, ANY, ALL, OR, Inner sub-queries, functions calls, functional defaults related to colocation keys.
  5. Multi-statement and explicit transaction statements also need to bypass partition awareness and fall back into default implementation.
  6. Probably no need to calculate partition aware information for Insert queries with pure literals defined for colocation columns.


Risks and Assumptions

// Describe project risks, such as API or binary compatibility issues, major protocol changes, etc.

...