arcolight commented on code in PR #7001:
URL: https://github.com/apache/ignite-3/pull/7001#discussion_r2549468458
##########
modules/platforms/cpp/ignite/odbc/sql_connection.cpp:
##########
@@ -178,6 +182,19 @@ sql_result sql_connection::internal_establish(const
configuration &cfg) {
bool errors = get_diagnostic_records().get_status_records_number() > 0;
+ auto heartbeat_ms = m_config.get_heartbeat_interval().get_value().count();
+
+ if (heartbeat_ms) {
+ assert(heartbeat_ms > 0);
+
+ heartbeat_ms = std::max(MIN_HEARTBEAT_INTERVAL.count(), heartbeat_ms);
+ }
+ m_heartbeat_interval = std::chrono::milliseconds(heartbeat_ms);
Review Comment:
Fixed.
##########
modules/platforms/cpp/tests/odbc-test/odbc_suite.h:
##########
@@ -54,6 +54,16 @@ class odbc_suite : public virtual ::testing::Test, public
odbc_connection {
return res;
}
+ /**
+ * Get heartbeat interval for tests.
+ *
+ * @return Heartbeat interval.
+ */
+ static std::chrono::milliseconds get_heartbeat_interval() {
+ using namespace std::chrono_literals;
+ return 2000ms;
Review Comment:
Right, it is simpler, of course.
--
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]