hubcio commented on code in PR #3729:
URL: https://github.com/apache/iggy/pull/3729#discussion_r3636828430


##########
core/connectors/sinks/elasticsearch_sink/src/lib.rs:
##########
@@ -83,7 +86,15 @@ impl ElasticsearchSink {
             .map_err(|error| Error::Connection(format!("Invalid Elasticsearch 
URL: {error}")))?;
 
         let conn_pool = 
elasticsearch::http::transport::SingleNodeConnectionPool::new(url);
-        let mut transport_builder = TransportBuilder::new(conn_pool);
+        // elasticsearch-rs defaults to no timeout; without this, a hung ES
+        // connection blocks FFI open() and the connectors HTTP health never 
binds.
+        let timeout_seconds = self
+            .config
+            .timeout_seconds
+            .unwrap_or(DEFAULT_TIMEOUT_SECONDS)
+            .max(1);

Review Comment:
   `.max(1)` silently turns `timeout_seconds: 0` into 1s. defensible - 
`Duration::ZERO` would instant-fail every request - but undocumented, and 
clickhouse_sink passes 0 through unclamped, so the two siblings now disagree on 
the same config field. document the clamp here; clickhouse should probably get 
the same guard.



-- 
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]

Reply via email to