You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add idempotent flag and graph queries default to not idempotent (#93)
* Add idempotent flag and graph queries default to not idempotent
If the proxy detects a graph query (using custom payload key
"graph-source") it treats the queries a not idempotent, unless a
idempotent flag is set to true. This not perfect, but it is not possible
to easily determine if a graph query is idempotent.
* Add support for DSE graph
Things that changed:
* If the backend cluster is DSE then `system.local` and `system.peers` queries return `dse_version`
* Empty query strings are valid for graph query, data is transferred using custom payload
* Add tests for `dse_version` and DSE Graph queries
* Make idempotent flag only applies to graph queries
* Fix formatting
* Update flag name
* Update README with new cli flags
Copy file name to clipboardExpand all lines: README.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,8 +39,8 @@ Usage: cql-proxy
39
39
40
40
Flags:
41
41
-h, --help Show context-sensitive help.
42
-
-b, --astra-bundle=STRING Path to secure connect bundle for an Astra database. Requires '--username' and '--password'. Ignored if using the token or contact points option
43
-
($ASTRA_BUNDLE).
42
+
-b, --astra-bundle=STRING Path to secure connect bundle for an Astra database. Requires '--username' and '--password'. Ignored if using the token or contact points
43
+
option ($ASTRA_BUNDLE).
44
44
-t, --astra-token=STRING Token used to authenticate to an Astra database. Requires '--astra-database-id'. Ignored if using the bundle path or contact points option
45
45
($ASTRA_TOKEN).
46
46
-i, --astra-database-id=STRING Database ID of the Astra database. Requires '--astra-token' ($ASTRA_DATABASE_ID)
@@ -59,6 +59,8 @@ Flags:
59
59
--heartbeat-interval=30s Interval between performing heartbeats to the cluster ($HEARTBEAT_INTERVAL)
60
60
--idle-timeout=60s Duration between successful heartbeats before a connection to the cluster is considered unresponsive and closed ($IDLE_TIMEOUT)
61
61
--readiness-timeout=30s Duration the proxy is unable to connect to the backend cluster before it is considered not ready ($READINESS_TIMEOUT)
62
+
--idempotent-graph If true it will treat all graph queries as idempotent by default and retry them automatically. It may be dangerous to retry some graph
63
+
queries -- use with caution ($IDEMPOTENT_GRAPH).
62
64
--num-conns=1 Number of connection to create to each node of the backend cluster ($NUM_CONNS)
63
65
--rpc-address=STRING Address to advertise in the 'system.local' table for'rpc_address'. It must be setif configuring peer proxies ($RPC_ADDRESS)
64
66
--data-center=STRING Data center to use in system tables ($DATA_CENTER)
p.logger.Warn("graph queries default to *not* being considered idempotent and will not be retried automatically. Use the idempotent graph flag to override.")
0 commit comments