Skip to content

fix(mysql): align JSON representation between snapshot and CDC#4535

Merged
dtunikov merged 16 commits into
mainfrom
fix/dbi-823/json-representation-snapshot-cdc-mismatch
Jul 9, 2026
Merged

fix(mysql): align JSON representation between snapshot and CDC#4535
dtunikov merged 16 commits into
mainfrom
fix/dbi-823/json-representation-snapshot-cdc-mismatch

Conversation

@dtunikov

@dtunikov dtunikov commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Before -> After:

inserted: {"name": "a", "id": 1, "val": 1.0, "pi": 3.14}
SNAPSHOT  SELECT js: {"id": 1, "pi": 3.14, "val": 1.0, "name": "a"}
RenderJSONAsMySQLText OFF (old): {"id":1,"name":"a","pi":3.14,"val":1}
RenderJSONAsMySQLText ON  (fix): {"id":1,"pi":3.14,"val":1.0,"name":"a"}
SNAPSHOT compacted (fix): {"id":1,"pi":3.14,"val":1.0,"name":"a"}

The three divergences (snapshot vs. old CDC, flag OFF)

Comparing {"id": 1, "pi": 3.14, "val": 1.0, "name": "a"} against {"id":1,"name":"a","pi":3.14,"val":1}:

  • Key order — snapshot is MySQL's JSONB order (length-then-bytes: id(2), pi(2), val(3), name(4)); old CDC went through map[string]any → json.Marshal sorted lexicographically (id, name, pi, val). Different order.
  • 1.0 → 1 — the val double lost its fractional part in the old CDC path (bare float64 → Go marshals whole numbers without .0), while snapshot keeps 1.0.
  • Whitespace — snapshot has spaces after : and ,; CDC is compact.

Notes

  • On mysql 5.7 SNAPSHOT SELECT returns 1 instead of 1.0, not much we can do about that.
  • why not using json.Marshal? It introduces silent data corruption for big ints.
source (MySQL text) : {"id": 1, "sf": 1234567890123456789, "val": 1.0, "amt": 9007199254740993}
json.Marshal path   : {"amt":9007199254740992,"id":1,"sf":1234567890123456800,"val":1}
json.Compact path   : {"id":1,"sf":1234567890123456789,"val":1.0,"amt":9007199254740993}   ← current fix

dtunikov and others added 2 commits July 3, 2026 17:04
MySQL JSON columns reached PeerDB through two different renderers that
disagreed on representation:

- Snapshot (text protocol): MySQL server-rendered JSON, type-faithful
  (DOUBLE 1.0 stays "1.0", JSONB key order preserved) but with a space
  after ':' and ','.
- CDC (binlog JSONB decoder): historically lossy -- 1.0 collapsed to 1,
  keys reordered by Go map iteration.

Enable RenderJSONAsMySQLText on the binlog syncer so CDC emits
type-faithful, key-order-preserving, compact JSON, and json.Compact the
snapshot text form so both paths are byte-consistent. MariaDB JSON is
LONGTEXT-backed (QValueKindString), so it never hits the compaction path
and is unaffected.

Adds a unit test for the compaction helper and an e2e test asserting the
snapshot and CDC representations of the same JSON value match.

DBI-823

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
DisableRetrySync: true,
UseDecimal: true,
ParseTime: true,
RenderJSONAsMySQLText: true,

@dtunikov dtunikov Jul 3, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one was added (really weird git diff because of go fmt)
we can also put it behind mirror version gate to ensure that the old mirrors continue working the same way (in case someone relies on default parsing logic)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

link to documentation for this flag if you want to read it:
https://github.com/go-mysql-org/go-mysql/blob/a57884f25cf0008867559df9012a6498bb17df70/replication/binlogsyncer.go#L111
the main reason we need it is to ensure that DOUBLEs are parsed properly

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like a reasonably safe change to introduce it without putting it behind a flag, given this was an inconsistency between initial snapshot and CDC.

@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

❌ 4 Tests Failed:

Tests completed Failed Passed Skipped
2979 4 2975 352
View the top 3 failed test(s) by shortest run time
github.com/PeerDB-io/peerdb/flow/e2e::TestPeerFlowE2ETestSuiteMariaDB_CH_Cluster
Stack Traces | 0.01s run time
=== RUN   TestPeerFlowE2ETestSuiteMariaDB_CH_Cluster
=== PAUSE TestPeerFlowE2ETestSuiteMariaDB_CH_Cluster
=== CONT  TestPeerFlowE2ETestSuiteMariaDB_CH_Cluster
--- FAIL: TestPeerFlowE2ETestSuiteMariaDB_CH_Cluster (0.01s)
github.com/PeerDB-io/peerdb/flow/e2e::TestPeerFlowE2ETestSuiteMariaDB_CH
Stack Traces | 0.02s run time
=== RUN   TestPeerFlowE2ETestSuiteMariaDB_CH
=== PAUSE TestPeerFlowE2ETestSuiteMariaDB_CH
=== CONT  TestPeerFlowE2ETestSuiteMariaDB_CH
--- FAIL: TestPeerFlowE2ETestSuiteMariaDB_CH (0.02s)
2026/07/07 10:26:11 INFO Received AWS credentials from peer for connector: ci x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN}
2026/07/07 10:26:12 INFO Received AWS credentials from peer for connector: clickhouse x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN}
2026/07/07 10:26:12 INFO Executing and processing query x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} partitionId=testpart query="SELECT id,\"key\" FROM e2e_test_pgch_6qiionll.\"table-group%a%b%c\" ORDER BY id"
2026/07/07 10:26:12 INFO Executing and processing query stream x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} partitionId=testpart query="SELECT id,\"key\" FROM e2e_test_pgch_6qiionll.\"table-group%a%b%c\" ORDER BY id"
2026/07/07 10:26:12 INFO [pg_query_executor] declared cursor x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} partitionId=testpart cursorQuery="DECLARE peerdb_cursor_6170077981617092546 CURSOR FOR SELECT id,\"key\" FROM e2e_test_pgch_6qiionll.\"table-group%a%b%c\" ORDER BY id" args=[]
2026/07/07 10:26:12 INFO [pg_query_executor] fetching rows start x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} partitionId=testpart query="SELECT id,\"key\" FROM e2e_test_pgch_6qiionll.\"table-group%a%b%c\" ORDER BY id" channelLen=0
2026/07/07 10:26:12 INFO [pg_query_executor] fetching from cursor x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} partitionId=testpart cursor=peerdb_cursor_6170077981617092546
2026/07/07 10:26:12 INFO processed row stream x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} partitionId=testpart cursor=peerdb_cursor_6170077981617092546 records=2 bytes=15 channelLen=1
2026/07/07 10:26:12 INFO [pg_query_executor] fetched rows x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} partitionId=testpart query="SELECT id,\"key\" FROM e2e_test_pgch_6qiionll.\"table-group%a%b%c\" ORDER BY id" rows=2 bytes=15 channelLen=1
2026/07/07 10:26:12 INFO [pg_query_executor] fetching from cursor x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} partitionId=testpart cursor=peerdb_cursor_6170077981617092546
2026/07/07 10:26:12 INFO processed row stream x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} partitionId=testpart cursor=peerdb_cursor_6170077981617092546 records=0 bytes=0 channelLen=0
2026/07/07 10:26:12 INFO [pg_query_executor] fetched rows x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} partitionId=testpart query="SELECT id,\"key\" FROM e2e_test_pgch_6qiionll.\"table-group%a%b%c\" ORDER BY id" rows=0 bytes=0 channelLen=0
2026/07/07 10:26:12 INFO [pg_query_executor] committing transaction x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} partitionId=testpart
2026/07/07 10:26:12 INFO [pg_query_executor] committed transaction for query x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} partitionId=testpart query="SELECT id,\"key\" FROM e2e_test_pgch_6qiionll.\"table-group%a%b%c\" ORDER BY id" rows=2 bytes=15 channelLen=0
github.com/PeerDB-io/peerdb/flow/e2e::TestPeerFlowE2ETestSuiteMariaDB_CH_Cluster/Test_MySQL_JSON_SnapshotCDCConsistency
Stack Traces | 19.3s run time
=== RUN   TestPeerFlowE2ETestSuiteMariaDB_CH_Cluster/Test_MySQL_JSON_SnapshotCDCConsistency
=== PAUSE TestPeerFlowE2ETestSuiteMariaDB_CH_Cluster/Test_MySQL_JSON_SnapshotCDCConsistency
=== CONT  TestPeerFlowE2ETestSuiteMariaDB_CH_Cluster/Test_MySQL_JSON_SnapshotCDCConsistency
2026/07/07 10:23:23 INFO Received AWS credentials from peer for connector: ci x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN}
2026/07/07 10:23:23 INFO fetched schema x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} table=e2e_test_machcl_yx5mm7sx.test_vector
    clickhouse_mysql_test.go:340: WaitFor waiting for initial snapshot 2026-07-07 10:23:27.383251917 +0000 UTC m=+656.192865236
    clickhouse_mysql_test.go:344: WaitFor waiting for cdc 2026-07-07 10:23:27.395912505 +0000 UTC m=+656.205525833
2026/07/07 10:23:27 INFO fetched schema x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} table=e2e_test_machcl_ny9uj3nt.test_datetime
    clickhouse_mysql_test.go:358: 
        	Error Trace:	.../flow/e2e/clickhouse_mysql_test.go:358
        	Error:      	Not equal: 
        	            	expected: "{\"big\":1234567890123456789}"
        	            	actual  : "{\"big\": 1234567890123456789}"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1 +1 @@
        	            	-{"big":1234567890123456789}
        	            	+{"big": 1234567890123456789}
        	Test:       	TestPeerFlowE2ETestSuiteMariaDB_CH_Cluster/Test_MySQL_JSON_SnapshotCDCConsistency
        	Messages:   	snapshot JSON not preserved faithfully for "{\"big\": 1234567890123456789}"
--- FAIL: TestPeerFlowE2ETestSuiteMariaDB_CH_Cluster/Test_MySQL_JSON_SnapshotCDCConsistency (19.27s)
github.com/PeerDB-io/peerdb/flow/e2e::TestPeerFlowE2ETestSuiteMariaDB_CH/Test_MySQL_JSON_SnapshotCDCConsistency
Stack Traces | 20.2s run time
=== RUN   TestPeerFlowE2ETestSuiteMariaDB_CH/Test_MySQL_JSON_SnapshotCDCConsistency
=== PAUSE TestPeerFlowE2ETestSuiteMariaDB_CH/Test_MySQL_JSON_SnapshotCDCConsistency
=== CONT  TestPeerFlowE2ETestSuiteMariaDB_CH/Test_MySQL_JSON_SnapshotCDCConsistency
2026/07/07 10:25:23 INFO Received AWS credentials from peer for connector: ci x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN}
2026/07/07 10:25:23 INFO Received AWS credentials from peer for connector: clickhouse x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN}
2026/07/07 10:25:23 INFO fetched schema x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} table=e2e_test_mach_gam4bkj8.test_nullengine
    clickhouse_mysql_test.go:340: WaitFor waiting for initial snapshot 2026-07-07 10:25:27.109056818 +0000 UTC m=+775.918670136
2026/07/07 10:25:27 INFO fetched schema x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} table=e2e_test_mach_l9w3mlox.test_coercion
    clickhouse_mysql_test.go:344: WaitFor waiting for cdc 2026-07-07 10:25:27.120595245 +0000 UTC m=+775.930208563
2026/07/07 10:25:27 INFO fetched schema x-peerdb-additional-metadata={Operation:FLOW_OPERATION_UNKNOWN} table=e2e_test_mach_xfq6fw6k.test_myisam
    clickhouse_mysql_test.go:358: 
        	Error Trace:	.../flow/e2e/clickhouse_mysql_test.go:358
        	Error:      	Not equal: 
        	            	expected: "{\"big\":1234567890123456789}"
        	            	actual  : "{\"big\": 1234567890123456789}"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1 +1 @@
        	            	-{"big":1234567890123456789}
        	            	+{"big": 1234567890123456789}
        	Test:       	TestPeerFlowE2ETestSuiteMariaDB_CH/Test_MySQL_JSON_SnapshotCDCConsistency
        	Messages:   	snapshot JSON not preserved faithfully for "{\"big\": 1234567890123456789}"
--- FAIL: TestPeerFlowE2ETestSuiteMariaDB_CH/Test_MySQL_JSON_SnapshotCDCConsistency (20.16s)

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

❌ Test Failure

Analysis: The PR's own new test Test_MySQL_JSON_SnapshotCDCConsistency deterministically fails with "Not equal: unexpected JSON representation at row 1" on the mysql-pos config (passing on both mysql-gtid configs), indicating the JSON snapshot/CDC mismatch the PR aims to fix is still present on that path — a real, config-dependent bug, not flakiness.
Confidence: 0.9

⚠️ This appears to be a real bug - manual intervention needed

View workflow run

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

❌ Test Failure

Analysis: A deterministic value-equality assertion ("unexpected JSON representation at row 1") fails in the very test (Test_MySQL_JSON_SnapshotCDCConsistency) that validates this PR's own fix for JSON snapshot/CDC alignment, indicating the fix is incomplete rather than a flaky failure.
Confidence: 0.9

⚠️ This appears to be a real bug - manual intervention needed

View workflow run

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

❌ Test Failure

Analysis: The PR's own new test Test_MySQL_JSON_SnapshotCDCConsistency deterministically fails a fixed JSON value assertion (expected "1.0", got "1") in both standalone and cluster variants, a real snapshot/CDC representation-mismatch bug the PR aims to fix — not a timeout, race, or network flake.
Confidence: 0.95

⚠️ This appears to be a real bug - manual intervention needed

View workflow run

dtunikov and others added 2 commits July 3, 2026 17:49
MySQL normalizes whole-number JSON doubles (1.0 -> 1) on storage, so the
previous exact-literal assertion was wrong. Rewrite the e2e test around
the invariant that actually matters for DBI-823: the snapshot and CDC
representations of the same JSON value must be byte-identical. Center the
variants on object key ordering, which is where the old CDC path (Go-map
lexicographic order) diverged from MySQL's (length-then-byte) order.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

❌ Test Failure

Analysis: A deterministic value mismatch in Test_MySQL_JSON_SnapshotCDCConsistency (JSON float serialized as "1.0000005e+06" instead of "1000000.5") that reproduced identically across multiple matrix jobs and directly reflects the unfixed bug this PR targets — not a flaky failure.
Confidence: 0.97

⚠️ This appears to be a real bug - manual intervention needed

View workflow run

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

❌ Test Failure

Analysis: A real, deterministic failure: the PR's own new test Test_MySQL_JSON_SnapshotCDCConsistency fails a JSON float-representation equality assertion identically across both MySQL_CH and MySQL_CH_Cluster variants, indicating the PR's snapshot/CDC JSON-alignment fix is incomplete rather than any flakiness.
Confidence: 0.93

⚠️ This appears to be a real bug - manual intervention needed

View workflow run

dtunikov and others added 3 commits July 6, 2026 09:29
For some magnitudes Go's float formatting (CDC decoder) emits scientific
notation where MySQL's text protocol emits plain decimal (e.g.
1.0000005e+06 vs 1000000.5) -- a documented go-mysql limitation, values
still round-trip. Use small non-whole doubles that render identically in
both paths so the snapshot/CDC consistency assertion holds.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Companion to Test_MySQL_JSON_SnapshotCDCConsistency that enables
PEERDB_CLICKHOUSE_ENABLE_JSON so the JSON column lands in a ClickHouse
JSON column. ClickHouse parses and normalizes the text on insert, which
absorbs the double text-format divergence the snapshot and CDC paths
cannot make byte-identical themselves (e.g. 1000000.5 vs 1.0000005e+06),
so the previously-diverging float values read back identically.

Compares toString(js) since GetRows does not scan the native JSON type
directly. Requires ClickHouse >= 25.3, same as Test_JSON.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
case types.QValueKindJSON:
return types.QValueJSON{Val: string(v)}, nil
// keep snapshot and cdc json representation consistent
return types.QValueJSON{Val: compactMySQLJSON(v)}, nil

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here, could gate behind internal mirror version to avoid inconsistency

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

🔄 Flaky Test Detected

Analysis: TestGenericPG/Test_Simple_Flow timed out waiting for STATUS_SNAPSHOT (generic_test.go:143) — a timing/timeout failure in a Postgres test unrelated to this MySQL-JSON PR that passed cleanly in the parallel matrix job on the same commit.
Confidence: 0.88

✅ Automatically retrying the workflow

View workflow run


// Test_MySQL_JSON_SnapshotCDCConsistency_NativeJSON is the native-JSON companion to
// Test_MySQL_JSON_SnapshotCDCConsistency.
func (s ClickHouseSuite) Test_MySQL_JSON_SnapshotCDCConsistency_NativeJSON() {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without PEERDB_CLICKHOUSE_ENABLE_JSON: true (i.e. JSON stored as String), snapshot and CDC can still disagree textually for doubles in magnitude ranges where the two paths format differently. The snapshot path uses MySQL's my_gcvt, which stays in plain decimal (e.g. 1000000.5), while the CDC path uses go-mysql, which switches to scientific notation (1.0000005e+06). The float64 value is identical — only the text differs — so it's harmless for native-JSON destinations (ClickHouse normalizes on parse) but visible for String-typed columns.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

today we technically don't support PEERDB_CLICKHOUSE_ENABLE_JSON for pg/mysql because ClickHouse JSON does not support non-object JSON types (e.g. number, string); but still good to get test coverage here still.

@dtunikov dtunikov marked this pull request as ready for review July 6, 2026 10:16
@dtunikov dtunikov requested a review from a team as a code owner July 6, 2026 10:16
@claude

claude Bot commented Jul 6, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

Comment thread flow/e2e/clickhouse_mysql_test.go Outdated
js json NOT NULL
)`, srcFullName)))

variants := []string{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: would be good to add a test case for 1.0 to test out type-faithfulness mentioned in the PR description

@dtunikov dtunikov Jul 7, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok.. tried it out

it doesn't work on mysql 5.7 inside non native json test:
https://github.com/PeerDB-io/peerdb/actions/runs/28851748697/job/85568516983?pr=4535
mysql 5.7 collapses 1.0 into 1 on the snapshot path
on the cdc path we get 1.0 as expected with the new flag set to true

sadly, not much we can do about it
mysql 5.7 behavior:

INSERT INTO jtest.t (js) VALUES ('{\"n\": [3, 1, 2], \"obj\": {\"y\": 1.0, \"x\": 2}}');
SELECT js FROM jtest.t;
SELECT JSON_TYPE(JSON_EXTRACT(js,'\$.obj.y')) FROM jtest.t;
----
{"n": [3, 1, 2], "obj": {"x": 2, "y": 1}}
DOUBLE

the only thing we could do is to extract value type using JSON_TYPE+JSON_EXTRACT, but I think it's too expensive (also will quite complex code which doesn't seem to worth it)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could also keep RenderJSONAsMySQLText=OFF for mysql 5.7
BUT it means that everything else will stay inconsistent on cdc path
i would rather keep it ON for all versions and maybe describe this snapshot 1.0 double inconsistency in docs if it's worth it

@jgao54 jgao54 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one nit, otherwise lgtm

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

❌ Test Failure

Analysis: Deterministic assertion failure in the PR's own new Test_MySQL_JSON_SnapshotCDCConsistency test (snapshot vs CDC JSON representation differs) on the mysql-pos/7.0 matrix while mysql-gtid/8.0 passed — a real, version-dependent bug the fix doesn't fully cover, not flakiness.
Confidence: 0.9

⚠️ This appears to be a real bug - manual intervention needed

View workflow run

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

❌ Test Failure

Analysis: A deterministic assertion failure in Test_MySQL_JSON_SnapshotCDCConsistency (large integer not preserved faithfully in JSON) that reproduces identically across two suite variants and directly tests the exact behavior this PR modifies, indicating a real bug rather than flakiness.
Confidence: 0.96

⚠️ This appears to be a real bug - manual intervention needed

View workflow run

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

❌ Test Failure

Analysis: Deterministic assertion failure in Test_MySQL_JSON_SnapshotCDCConsistency across all 3 MySQL matrix jobs: the PR's own snapshot/CDC JSON-alignment fix is incomplete, as the snapshot path still emits a space after the colon ({"big": ...}) while CDC emits compact JSON ({"big":...})—a real bug, not a flake.
Confidence: 0.97

⚠️ This appears to be a real bug - manual intervention needed

View workflow run

@ilidemi

ilidemi commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Didn't get to this yet, agree the MySQL JSON nuances need a more thorough look

@ilidemi ilidemi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool that a recent change makes this easier.
CH supports extracting larger ints from JSON strings as well https://fiddle.clickhouse.com/1db6559b-7fe3-4640-b9e5-29411baf4c57
Ultra long decimals aren't supported and would need a custom decoder/encoder but we'll wait for a feature request, especially that it doesn't break the pipe like PG did

@dtunikov dtunikov enabled auto-merge (squash) July 9, 2026 09:35
@dtunikov dtunikov merged commit 3440261 into main Jul 9, 2026
18 checks passed
@dtunikov dtunikov deleted the fix/dbi-823/json-representation-snapshot-cdc-mismatch branch July 9, 2026 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants