timoninmaxim commented on code in PR #11044:
URL: https://github.com/apache/ignite/pull/11044#discussion_r1398448427
##########
modules/core/src/main/java/org/apache/ignite/internal/cdc/CdcMain.java:
##########
@@ -459,8 +472,33 @@ public void consumeWalSegmentsUntilStopped() {
}
lastSgmnt.set(nextSgmnt);
- })
- .forEach(this::consumeSegment); // Consuming segments.
+ }).iterator();
+
+ while (it.hasNext()) {
+ Path segment = it.next();
+
+ if (log.isInfoEnabled()) {
+ log.info("Processing WAL segment [mode=" +
(cdcMgrModeState ? "manager" : "file")
+ + ", segment=" + segment + ']');
+ }
+
+
lastSegmentConsumptionTs.value(System.currentTimeMillis());
+ curSegmentIdx.value(segmentIndex(segment));
+
+ if (cdcMgrModeState) {
+ consumeSegmentPassively(segment);
Review Comment:
I reverted this, and use another WALRecord for sending walState instead of
writing directly to the file. There are some issues when saved walState greater
than a processing or known segment. It's pretty tricky to handle it within
CdcMain. I suppose to use record is much more convenient and straightforward.
--
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]