Skip to content

Commit 32930a1

Browse files
Copilotporunov
andcommitted
Address code review feedback
- Remove support for 'cdc_only' format, use only 'cdc-only' - Set mode to null when CDC is disabled for clarity - Update README to clarify supported mode values - All non-Docker tests passing Co-authored-by: porunov <[email protected]>
1 parent ab082a0 commit 32930a1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

janusgraph-cdc/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ When using JanusGraph with external index backends, there's a risk of inconsiste
2121

2222
### CDC Modes
2323

24-
- **DUAL** (default): Write to index during transaction AND publish to CDC topic for redundancy
25-
- **SKIP**: Skip index writes during transaction, rely entirely on CDC
26-
- **CDC_ONLY**: Same as SKIP (deprecated naming)
24+
- **dual** (default): Write to index during transaction AND publish to CDC topic for redundancy
25+
- **skip**: Skip index writes during transaction, rely entirely on CDC
26+
- **cdc-only**: Alias for skip mode (for backward compatibility)
2727

2828
## Configuration
2929

janusgraph-cdc/src/main/java/org/janusgraph/diskstorage/cdc/CdcConfiguration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ public CdcConfiguration(Configuration config) {
4646
log.info("CDC enabled with mode: {}, topic: {}, bootstrap servers: {}",
4747
mode, kafkaTopic, kafkaBootstrapServers);
4848
} else {
49-
this.mode = CdcIndexTransaction.CdcMode.DUAL;
49+
// When disabled, these values are not used
50+
this.mode = null;
5051
this.kafkaBootstrapServers = null;
5152
this.kafkaTopic = null;
5253
}
@@ -63,7 +64,6 @@ private CdcIndexTransaction.CdcMode parseCdcMode(String modeStr) {
6364
case "dual":
6465
return CdcIndexTransaction.CdcMode.DUAL;
6566
case "cdc-only":
66-
case "cdc_only":
6767
return CdcIndexTransaction.CdcMode.CDC_ONLY;
6868
default:
6969
log.warn("Unknown CDC mode: {}, defaulting to DUAL", modeStr);

0 commit comments

Comments
 (0)