azexcy commented on code in PR #30498: URL: https://github.com/apache/shardingsphere/pull/30498#discussion_r1527710375
########## kernel/data-pipeline/dialect/opengauss/src/test/java/org/apache/shardingsphere/data/pipeline/opengauss/ingest/wal/decode/MppdbDecodingPluginTest.java: ########## @@ -237,21 +238,41 @@ void assertDecodeWithXid() { tableData.setColumnsVal(new String[]{"'7D'"}); List<String> dataList = Arrays.asList("BEGIN 1", JsonUtils.toJsonString(tableData), JsonUtils.toJsonString(tableData), "COMMIT 1 (at 2022-10-27 04:19:39.476261+00) CSN 3468"); - MppdbDecodingPlugin mppdbDecodingPlugin = new MppdbDecodingPlugin(null, true); + MppdbDecodingPlugin mppdbDecodingPlugin = new MppdbDecodingPlugin(null, true, 2); List<AbstractWALEvent> expectedEvent = new LinkedList<>(); for (String each : dataList) { expectedEvent.add(mppdbDecodingPlugin.decode(ByteBuffer.wrap(each.getBytes()), logSequenceNumber)); } assertThat(expectedEvent.size(), is(4)); AbstractWALEvent actualFirstEvent = expectedEvent.get(0); assertInstanceOf(BeginTXEvent.class, actualFirstEvent); - assertThat(((BeginTXEvent) actualFirstEvent).getXid(), is(1L)); AbstractWALEvent actualLastEvent = expectedEvent.get(expectedEvent.size() - 1); assertInstanceOf(CommitTXEvent.class, actualLastEvent); assertThat(((CommitTXEvent) actualLastEvent).getCsn(), is(3468L)); assertThat(((CommitTXEvent) actualLastEvent).getXid(), is(1L)); } + @Test + void assertParallelDecodeWithTx() { + MppTableData tableData = new MppTableData(); + tableData.setTableName("public.test"); + tableData.setOpType("INSERT"); + tableData.setColumnsName(new String[]{"data"}); + tableData.setColumnsType(new String[]{"raw"}); + tableData.setColumnsVal(new String[]{"'7D'"}); + List<String> dataList = Arrays.asList("BEGIN CSN: 951909 first_lsn: 5/59825858", JsonUtils.toJsonString(tableData), JsonUtils.toJsonString(tableData), "commit xid: 1006076"); Review Comment: I test `opengauss 3.x` and `5.x`, prarallel decoding always return lowercase at commit. <img width="1084" alt="image" src="https://github.com/apache/shardingsphere/assets/101622833/4b1b241f-f387-4005-b8ec-4c03a8c6cb8b"> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@shardingsphere.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org