nizhikov commented on a change in pull request #99:
URL: https://github.com/apache/ignite-extensions/pull/99#discussion_r812322442
##########
File path:
modules/cdc-ext/src/main/java/org/apache/ignite/cdc/kafka/KafkaToIgniteCdcStreamerApplier.java
##########
@@ -114,6 +111,9 @@
/** */
private final AtomicLong rcvdEvts = new AtomicLong();
+ /** The maximum time to complete Kafka related requests, in seconds. */
+ private final int kafkaReqTimeout;
Review comment:
Let's measure timeout in milliseconds.
##########
File path:
modules/cdc-ext/src/main/java/org/apache/ignite/cdc/kafka/KafkaToIgniteCdcStreamerApplier.java
##########
@@ -211,7 +213,7 @@ private void poll(KafkaConsumer<Integer, byte[]> cnsmr)
throws IgniteCheckedExce
apply(F.iterator(recs, this::deserialize, true, rec ->
F.isEmpty(caches) || caches.contains(rec.key())));
- cnsmr.commitSync(Duration.ofSeconds(DFLT_REQ_TIMEOUT));
+ cnsmr.commitSync(Duration.ofSeconds(kafkaReqTimeout));
Review comment:
Let's measure timeout in milliseconds.
##########
File path:
modules/cdc-ext/src/main/java/org/apache/ignite/cdc/kafka/KafkaToIgniteCdcStreamerApplier.java
##########
@@ -201,7 +203,7 @@ public KafkaToIgniteCdcStreamerApplier(
* @param cnsmr Data consumer.
*/
private void poll(KafkaConsumer<Integer, byte[]> cnsmr) throws
IgniteCheckedException {
- ConsumerRecords<Integer, byte[]> recs =
cnsmr.poll(Duration.ofSeconds(DFLT_REQ_TIMEOUT));
+ ConsumerRecords<Integer, byte[]> recs =
cnsmr.poll(Duration.ofSeconds(kafkaReqTimeout));
Review comment:
Let's measure timeout in milliseconds.
##########
File path:
modules/cdc-ext/src/main/java/org/apache/ignite/cdc/kafka/KafkaToIgniteCdcStreamerApplier.java
##########
@@ -182,7 +184,7 @@ public KafkaToIgniteCdcStreamerApplier(
finally {
for (KafkaConsumer<Integer, byte[]> consumer : cnsmrs) {
try {
- consumer.close(Duration.ofSeconds(DFLT_REQ_TIMEOUT));
+ consumer.close(Duration.ofSeconds(kafkaReqTimeout));
Review comment:
Let's measure timeout in milliseconds.
--
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]