back

by tang8330·3y ago·view on hn ↗
Great question! Say this happened:

* CREATE TABLE user_test (id int primary key, name text);

* INSERT INTO user_test (id, name) VALUES (1, 'foo');

* UPDATE user_test set id = 2 where id = 1;

When the UPDATE call is invoked, there will be 2 events emitted to Kafka. 1/ A DELETE event for id = 1

2/ A CREATE event for id = 2

Here's the detailed events that get emitted: https://gist.github.com/Tang8330/7a9450f95fbae486a4393abdd49...

1 comments
Interesting! I'm both surprised and also not surprised it's modeled that way.
Eventual consistency FTW!