Skip to content

Commit 5dc6e69

Browse files
committed
remove warning logging
1 parent 545e1b9 commit 5dc6e69

1 file changed

Lines changed: 24 additions & 22 deletions

File tree

extensions/kafka/src/main/java/io/deephaven/kafka/KafkaTools.java

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -352,47 +352,49 @@ private KeyOrValueIngestData getIngestDataAndIncrementColumnIndex(
352352
// to columnsDefinitionOut though, this is a more serious error.
353353
final KeyOrValueIngestData ingestData = getIngestData(keyOrValue, schemaRegistryClient, configs,
354354
nextColumnIndexMut, columnDefinitionsOut);
355-
final int addedIx = nextColumnIndexMut.get() - ixPre;
355+
// Note: choosing to _not_ log warning when caller is mutating the index "incorrectly", but keeping code
356+
// commented out here for future reference.
357+
// final int addedIx = nextColumnIndexMut.get() - ixPre;
356358
final int addedColumns = columnDefinitionsOut.size() - sizePre;
357359
if (ingestData == null) {
358360
// ignore case (or, possibly a complex impl that chooses to return null when it's empty):
359361
// expecting no modifications
360362
if (addedColumns != 0) {
361363
throw new IllegalStateException(
362-
"KeyOrValueSpec getIngestData is modifying out-variables without returning ingest data");
363-
}
364-
if (addedIx != 0) {
365-
log.warn().append(
366-
"Ignore KeyOrValueSpec getIngestData is improperly mutating the index; manually correcting...")
367-
.endl();
364+
"KeyOrValueSpec getIngestData is modifying columnDefinitionsOut without returning ingest data");
368365
}
366+
// if (addedIx != 0) {
367+
// log.warn().append(
368+
// "Ignore KeyOrValueSpec getIngestData is improperly mutating the index; manually correcting...")
369+
// .endl();
370+
// }
369371
} else if (ingestData.isSimple()) {
370372
// simple case:
371373
// expecting exactly one increment and one column
372374
if (addedColumns != 1) {
373375
throw new IllegalStateException(
374-
"Simple KeyOrValueSpec getIngestData is not adding exactly one index and one column");
375-
}
376-
if (addedIx != 1) {
377-
log.warn().append(
378-
"Simple KeyOrValueSpec did not properly mutate the index by 1; manually correcting...")
379-
.endl();
380-
}
381-
if (ingestData.simpleColumnIndex != ixPre) {
382-
log.warn().append("Simple KeyOrValueSpec set a bad simpleColumnIndex; manually correcting...")
383-
.endl();
376+
"Simple KeyOrValueSpec getIngestData is not adding exactly one column");
384377
}
378+
// if (addedIx != 1) {
379+
// log.warn().append(
380+
// "Simple KeyOrValueSpec did not properly mutate the index by 1; manually correcting...")
381+
// .endl();
382+
// }
383+
// if (ingestData.simpleColumnIndex != ixPre) {
384+
// log.warn().append("Simple KeyOrValueSpec set a bad simpleColumnIndex; manually correcting...")
385+
// .endl();
386+
// }
385387
// The fact that we are setting this here means that this would ideally not be the responsibility of
386388
// the implementation...
387389
ingestData.simpleColumnIndex = ixPre;
388390
} else {
389391
// complex case:
390392
// expecting no increments - we'll increase the index based on any columns that were added
391-
if (addedIx != 0) {
392-
log.warn().append(
393-
"Complex KeyOrValueSpec getIngestData is improperly mutating the index; manually correcting...")
394-
.endl();
395-
}
393+
// if (addedIx != 0) {
394+
// log.warn().append(
395+
// "Complex KeyOrValueSpec getIngestData is improperly mutating the index; manually correcting...")
396+
// .endl();
397+
// }
396398
}
397399
// The fact that we are setting this here means that this would ideally not be the responsibility of the
398400
// implementation...

0 commit comments

Comments
 (0)