Comments (1)
I can replicate in 21.1.3. It seems to affect table that have a composite PK only.
# Open terminal for the source
cockroach start-single-node --listen-addr :30000 --http-addr :30001 --store cockroach-data/30000 --insecure --background
cockroach sql --insecure --port 30000 <<EOF
create table t (id int, s string, ts TIMESTAMP, primary key (id, s));
-- add enterprise license
SET CLUSTER SETTING cluster.organization = 'Workshop';
SET CLUSTER SETTING enterprise.license = 'crl-0-xxxxxxxxxxxxxx';
SET CLUSTER SETTING kv.rangefeed.enabled = true;
CREATE CHANGEFEED FOR TABLE defaultdb.t INTO 'experimental-http://127.0.0.1:30004/crdbusertable' WITH updated,resolved='10s';
EOF
# Open terminal for target
cockroach start-single-node --listen-addr :30002 --http-addr :30003 --store cockroach-data/30002 --insecure --background
cockroach sql --insecure --port 30002 -e "create table t (id int, s string, ts TIMESTAMP, primary key (id, s));"
cockroach sql --insecure --port 30002 -e "select * from t;" --watch 5s
# Open terminal for cdc-sink
cdc-sink --port 30004 --conn postgresql://root@localhost:30002/defaultdb?sslmode=disable --config '[{"endpoint":"crdbusertable", "source_table":"t", "destination_database":"defaultdb", "destination_table":"t"}]'
# on source terminal:
cockroach sql --port 30000 --insecure -e "insert into t values (1, 'hello', now());"
cockroach sql --port 30000 --insecure -e "delete from t where id=1"
# on target terminal, stop the watch, it will have output
id | s | ts
-----+-------+-----------------------------
1 | hello | 2021-08-04 18:54:40.573866
(1 row)
and run
cockroach sql --insecure --port 30002 -e "select * from _cdc_sink.defaultdb_t;"
nanos | logical | key | after
----------------------+---------+-------------+--------
1628103287843786000 | 0 | [1,"hello"] | null
# on CDC SINK terminal
fabio@mac: ~/projects/cdc-sink $ ./cdc-sink --port 30004 --conn postgresql://root@localhost:30002/defaultdb?sslmode=disable --config '[{"endpoint":"crdbusertable", "source_table":"t", "destination_database":"defaultdb", "destination_table":"t"}]'
2021/08/04 14:54:22 listening on [::]:30004
2021/08/04 14:54:24 crdbusertable: resolved - timestamp 1628103260894898000.0
2021/08/04 14:54:34 crdbusertable: resolved - timestamp 1628103270899540000.0
2021/08/04 14:54:44 crdbusertable: added 1 operations
2021/08/04 14:54:44 crdbusertable: resolved - timestamp 1628103281104895000.0
2021/08/04 14:54:44 crdbusertable: _CDC_SINK.defaultdb_t executed 1 operations
2021/08/04 14:54:54 crdbusertable: added 1 operations
2021/08/04 14:54:54 crdbusertable: resolved - timestamp 1628103291109468000.0
2021/08/04 14:54:54 crdbusertable: _CDC_SINK.defaultdb_t executed 1 operations
2021/08/04 14:54:54 ERROR: at or near "2": syntax error (SQLSTATE 42601)
2021/08/04 14:55:04 crdbusertable: resolved - timestamp 1628103301314464000.0
2021/08/04 14:55:04 crdbusertable: _CDC_SINK.defaultdb_t executed 1 operations
2021/08/04 14:55:04 ERROR: at or near "2": syntax error (SQLSTATE 42601)
from replicator.
Related Issues (20)
- Build Changefeed load generator
- Kafka: integration testing with OATH2
- Composite checkpoints
- Kafka: provide a grafana dashboard to track kafka connector performance. HOT 1
- Kafka: retrieve offsets in parallel across multiple topics and partitions.
- Rename this repo to Replicator HOT 1
- Panic in mylogical/conn.go; index out of bounds
- Data race in leases_test.go
- Demo for update-only table
- Support data models with natural keys
- mysql GTIDs are incorrect in the memo table
- mysql replication requires target database to be same as the source database.
- Handle non-idempotent Changefeed redelivery HOT 2
- Verify varchar to Oracle clob
- Allow split-mode Replicator to be restarted if the target is down
- Update cdc/server/integration_test.go with workload.Checker
- Lingering global flags
- configureTable.deletesTo should support a callback
- Allow workload subcommand to write to real db
- Load API SQL does not work with MariaDB
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from replicator.