comdb2 icon indicating copy to clipboard operation
comdb2 copied to clipboard

New remsql version (standalone queries only) that runs over cdb2api.

Open dorinhogea opened this issue 6 months ago • 2 comments

The latest version of remsql, available for standalone queries, runs the latter over cdb2api instead of the remsql custom protocol.
There are a few additions to cdb2api, which are done using SET instructions (to minimize impact);

  • passing protocol version (this lets live cross-cluster connections between different fdb versions)
  • passing table version (required by distributed schema change versioning)
  • passing cursor id (for tracking)
  • passing schema morphing (specific for remote sql, simulates covering indexes for remote schemas) Three new tunables:
  • fdb_remsql_cdb2api: switches standalone queries to cdb2api protocol
  • fdb_default_version: testing only, configure a node to speak a specific remsql version by default (a remote node can downgrade this to a lower version, for backward compatibility)
  • fdb_version_emulate_precdbapi: testing only, configure a remote remsql node to fail to parse new SET options and behave like 8.0

NOTE: this relies on the cdb2api ability to pass rows in sqlite format, which was developed initially to support fdb push (forwarding full sql to remote nodes).

dorinhogea avatar Aug 22 '24 17:08 dorinhogea