THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
DataRegionConfiguration#cdcMode
== ONLINE, then create CdcProcessor
.CdcProcessor
read from the Metastorage the last persisted CdcConsumerState
.CdcState == null OR CdcState#enabled
is false then skip initialization.GridCacheDatabaseSharedManager#performBinaryMemoryRestore
.Code Block | ||||
---|---|---|---|---|
| ||||
class CdcProcessor implements MetastorageLifecycleListener {
private final Queue<ReadSegment> queue;
void onReadyForRead() {
// Read CdcState, if enabled then replay WAL here for collecting logical records.
}
void boolean onKernalStart() {
// start CdcWorker.
}
}
class CdcConsumerState {
private final WALPointer committedPtr;
private final boolean enabled;
} |
...
StopOnlineCdcRecord
to WALOtherwise, stop online CDC:
CdcConsumerState
with (enabled=false, last send WALPointer)StopOnlineCdcRecord
into WAL (use the prepared CdcConsumerState)....
OnlineCdcRecord
record to WAL with the WALPointer.Code Block | ||||
---|---|---|---|---|
| ||||
OnlineCdcRecord extends WALRecord {
private WALPointer last;
}
StopOnlineCdcRecord extends WALRecord {
private WALPointer last;
}
|
...