Skip to content

Commit c555c0e

Browse files
IGNITE-27105 SQL: Add JDBC local query property
1 parent 0081e8c commit c555c0e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinConnection.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,14 @@ public JdbcThinConnection(ConnectionProperties connProps) throws SQLException {
301301

302302
schema = JdbcUtils.normalizeSchema(connProps.getSchema());
303303

304+
if (connProps.isLocal()) {
305+
if (connProps.getAddresses().length != 1
306+
|| connProps.getAddresses()[0].portFrom() != connProps.getAddresses()[0].portTo()) {
307+
LOG.warning("Local flag is supposed to be used only when exactly one address is specified, " +
308+
"otherwise the local query may be executed on an unexpected node");
309+
}
310+
}
311+
304312
partitionAwareness = connProps.isPartitionAwareness();
305313

306314
if (partitionAwareness) {

0 commit comments

Comments
 (0)