diff --git a/README.md b/README.md index 4eafe66..3a243d2 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ the proxy connects to both Origin and Target clusters. By default, the proxy will forward read requests only to the Origin cluster, though you can optionally configure it to forward reads to both clusters asynchronously, while writes will always be sent to both clusters concurrently. -An overview of the proxy architecture and logical flow can be viewed [here](https://docs.datastax.com/en/astra-serverless/docs/migrate/introduction.html#migration-workflow). +An overview of the proxy architecture and logical flow can be viewed [here](https://docs.datastax.com/en/data-migration/introduction.html#migration-phases). ## Quick Start diff --git a/integration-tests/virtualization_test.go b/integration-tests/virtualization_test.go index 0e23ead..243080e 100644 --- a/integration-tests/virtualization_test.go +++ b/integration-tests/virtualization_test.go @@ -340,6 +340,7 @@ func TestVirtualizationTokenAwareness(t *testing.T) { cqlsh> describe system.local; #3.11 CREATE TABLE system.local ( + key text PRIMARY KEY, bootstrapped text, broadcast_address inet, @@ -358,21 +359,22 @@ CREATE TABLE system.local ( thrift_version text, tokens set, truncated_at map + ) - cqlsh> describe system.peers; - #3.11 - CREATE TABLE system.peers ( - peer inet PRIMARY KEY, - data_center text, - host_id uuid, - preferred_ip inet, - rack text, - release_version text, - rpc_address inet, - schema_version uuid, - tokens set - ) + cqlsh> describe system.peers; + #3.11 + CREATE TABLE system.peers ( + peer inet PRIMARY KEY, + data_center text, + host_id uuid, + preferred_ip inet, + rack text, + release_version text, + rpc_address inet, + schema_version uuid, + tokens set + ) */ func TestInterceptedQueries(t *testing.T) { testSetup, err := setup.NewSimulacronTestSetupWithSessionAndNodes(t, false, false, 3) diff --git a/proxy/pkg/zdmproxy/queryinspector.go b/proxy/pkg/zdmproxy/queryinspector.go index 43e4d99..3616dcc 100644 --- a/proxy/pkg/zdmproxy/queryinspector.go +++ b/proxy/pkg/zdmproxy/queryinspector.go @@ -170,23 +170,25 @@ func (recv *selectClause) GetSelectors() []selector { } // selector represents a selector in the cql grammar. 'term' and 'K_CAST' selectors are not supported. -// selector -// : unaliasedSelector ( K_AS identifier )? -// ; // -// unaliasedSelector -// : identifier -// | term -// | K_COUNT '(' '*' ')' -// | K_CAST '(' unaliasedSelector K_AS primitiveType ')' -// ; +// selector +// : unaliasedSelector ( K_AS identifier )? +// ; +// +// unaliasedSelector +// : identifier +// | term +// | K_COUNT '(' '*' ')' +// | K_CAST '(' unaliasedSelector K_AS primitiveType ')' +// ; type selector interface { Name() string } // idSelector represents an unaliased identifier selector: -// unaliasedSelector -// : identifier +// +// unaliasedSelector +// : identifier type idSelector struct { name string } @@ -196,7 +198,8 @@ func (recv *idSelector) Name() string { } // countSelector represents an unaliased count(*) selector: -// K_COUNT '(' '*' ')' +// +// K_COUNT '(' '*' ')' type countSelector struct { name string } @@ -206,9 +209,10 @@ func (recv *countSelector) Name() string { } // aliasedSelector represents an unaliased selector combined with an alias: -// selector -// : unaliasedSelector ( K_AS identifier )? -// ; +// +// selector +// : unaliasedSelector ( K_AS identifier )? +// ; type aliasedSelector struct { selector selector alias string diff --git a/proxy/pkg/zdmproxy/querymodifier.go b/proxy/pkg/zdmproxy/querymodifier.go index 10c7c3f..91eb9c0 100644 --- a/proxy/pkg/zdmproxy/querymodifier.go +++ b/proxy/pkg/zdmproxy/querymodifier.go @@ -17,8 +17,8 @@ func NewQueryModifier(timeUuidGenerator TimeUuidGenerator) *QueryModifier { } // replaceQueryString modifies the incoming request in certain conditions: -// * the request is a QUERY or PREPARE -// * and it contains now() function calls +// - the request is a QUERY or PREPARE +// - and it contains now() function calls func (recv *QueryModifier) replaceQueryString(currentKeyspace string, context *frameDecodeContext) (*frameDecodeContext, []*statementReplacedTerms, error) { decodedFrame, statementsQueryData, err := context.GetOrDecodeAndInspect(currentKeyspace, recv.timeUuidGenerator) if err != nil {