sandynz commented on code in PR #22685:
URL: https://github.com/apache/shardingsphere/pull/22685#discussion_r1040607440


##########
kernel/data-pipeline/dialect/opengauss/src/main/java/org/apache/shardingsphere/data/pipeline/opengauss/ingest/OpenGaussWALDumper.java:
##########
@@ -99,6 +113,23 @@ private PgConnection getReplicationConnectionUnwrap() 
throws SQLException {
         return 
logicalReplication.createConnection((StandardPipelineDataSourceConfiguration) 
dumperConfig.getDataSourceConfig()).unwrap(PgConnection.class);
     }
     
+    private void processEventWithXid(final AbstractWALEvent event) {
+        if (event instanceof AbstractRowEvent) {
+            rowEvents.add((AbstractRowEvent) event);
+            return;
+        }
+        if (event instanceof BeginXidEvent) {
+            rowEvents.clear();
+        }
+        if (event instanceof CommitXidEvent) {
+            for (AbstractRowEvent each : rowEvents) {
+                // TODO if multiple threads are pushing data in a channel at 
the same time, the order of the data will be incorrect
+                channel.pushRecord(walEventConverter.convert(each));
+            }
+        }
+        channel.pushRecord(walEventConverter.convert(event));

Review Comment:
   OK. Since TX events are ignored before, if it's added this time, then it 
might need to update related events consumption



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to