eventuate-tram-examples-customers-and-orders
eventuate-tram-examples-customers-and-orders copied to clipboard
Build 627 failed. Order state is pending instead of rejected
see: https://app.circleci.com/pipelines/github/eventuate-tram/eventuate-tram-examples-customers-and-orders/147/workflows/1cbcbce6-1360-4b23-8e08-f071ee5fccbf/jobs/627
Problem: Eventuate cdc service caches primary keys:
https://github.com/eventuate-foundation/eventuate-cdc/blob/0ada218b4228f03bf9d967968dc178e16010cce6/eventuate-local-java-cdc-connector-polling/src/main/java/io/eventuate/local/polling/PollingDao.java#L34
https://github.com/eventuate-foundation/eventuate-cdc/blob/0ada218b4228f03bf9d967968dc178e16010cce6/eventuate-local-java-cdc-connector-polling/src/main/java/io/eventuate/local/polling/PollingDao.java#L203-L219
After db id migration primary key column is changed. New message records after migration have empty old primary key. When any new message processed, all new records marked as published, because have empty old primary key (and cdc uses it when marks event published), so some messages were ignored by cdc.
Solution: Restart cdc service after migration.