You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by "HTHou (via GitHub)" <gi...@apache.org> on 2024/09/19 10:56:08 UTC
[PR] [Draft]Support table model redirect [iotdb]
HTHou opened a new pull request, #13550:
URL: https://github.com/apache/iotdb/pull/13550
## Description
Draft
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Draft]Support table model insert redirection [iotdb]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #13550:
URL: https://github.com/apache/iotdb/pull/13550#issuecomment-2372717619
## [](https://sonarcloud.io/dashboard?id=apache_iotdb&pullRequest=13550) **Quality Gate failed**
Failed conditions
 [6.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_iotdb&pullRequest=13550&metric=new_duplicated_lines_density&view=list) (required ≤ 3%)
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache_iotdb&pullRequest=13550)
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support table model insert redirection [iotdb]
Posted by "jt2594838 (via GitHub)" <gi...@apache.org>.
jt2594838 commented on code in PR #13550:
URL: https://github.com/apache/iotdb/pull/13550#discussion_r1776200063
##########
iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java:
##########
@@ -2697,6 +2790,111 @@ public void insertRelationalTablet(Tablet tablet)
insertRelationalTablet(tablet, false);
}
+ private void insertRelationalTabletWithLeaderCache(Tablet tablet)
+ throws IoTDBConnectionException, StatementExecutionException {
+ Map<SessionConnection, Tablet> relationalTabletGroup = new HashMap<>();
+ if (tableModelDeviceIdToEndpoint.isEmpty()) {
+ relationalTabletGroup.put(defaultSessionConnection, tablet);
+ } else {
+ for (int i = 0; i < tablet.rowSize; i++) {
+ IDeviceID iDeviceID = tablet.getDeviceID(i);
+ final SessionConnection connection = getSessionConnection(iDeviceID);
+ int finalI = i;
+ relationalTabletGroup.compute(
+ connection,
+ (k, v) -> {
+ if (v == null) {
+ v =
+ new Tablet(
+ tablet.getTableName(),
+ tablet.getSchemas(),
+ tablet.getColumnTypes(),
+ tablet.rowSize);
+ }
+ for (int j = 0; j < v.getSchemas().size(); j++) {
+ v.addValue(
+ v.getSchemas().get(j).getMeasurementId(),
+ v.rowSize,
+ tablet.getValue(finalI, j));
+ }
+ v.addTimestamp(v.rowSize, tablet.timestamps[finalI]);
+ v.rowSize++;
+ return v;
+ });
+ }
+ }
+ insertRelationalTabletByGroup(relationalTabletGroup);
+ }
+
+ @SuppressWarnings({
+ "squid:S3776"
+ }) // ignore Cognitive Complexity of methods should not be too high
+ private <T> void insertRelationalTabletByGroup(
Review Comment:
Where is this type parameter T used?
##########
iotdb-client/isession/src/main/java/org/apache/iotdb/isession/IPooledSession.java:
##########
@@ -28,6 +28,7 @@
import org.apache.thrift.TException;
import org.apache.tsfile.write.record.Tablet;
+/** NOTICE: IPooledSession is specific to the table model. */
public interface IPooledSession extends AutoCloseable {
Review Comment:
I have added an annotation @TableModel, may use that.
##########
iotdb-client/session/src/main/java/org/apache/iotdb/session/pool/SessionPool.java:
##########
@@ -703,7 +709,16 @@ private ISession getSession() throws IoTDBConnectionException {
session = constructNewSession();
try {
- session.open(enableCompression, connectionTimeoutInMs, deviceIdToEndpoint, availableNodes);
+ if (sqlDialect.equals("tree")) {
+ session.open(
+ enableCompression, connectionTimeoutInMs, deviceIdToEndpoint, availableNodes);
+ } else {
+ session.open(
+ enableCompression,
+ connectionTimeoutInMs,
+ availableNodes,
+ tableModelDeviceIdToEndpoint);
+ }
Review Comment:
This may not be so robust. If a developer types "treee" by mistake, we should inform him instead of treating it as "table".
Another related suggestion may be replacing the strings with named constants.
##########
iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java:
##########
@@ -2697,6 +2790,111 @@ public void insertRelationalTablet(Tablet tablet)
insertRelationalTablet(tablet, false);
}
+ private void insertRelationalTabletWithLeaderCache(Tablet tablet)
+ throws IoTDBConnectionException, StatementExecutionException {
+ Map<SessionConnection, Tablet> relationalTabletGroup = new HashMap<>();
+ if (tableModelDeviceIdToEndpoint.isEmpty()) {
+ relationalTabletGroup.put(defaultSessionConnection, tablet);
+ } else {
+ for (int i = 0; i < tablet.rowSize; i++) {
+ IDeviceID iDeviceID = tablet.getDeviceID(i);
+ final SessionConnection connection = getSessionConnection(iDeviceID);
+ int finalI = i;
+ relationalTabletGroup.compute(
+ connection,
+ (k, v) -> {
+ if (v == null) {
+ v =
+ new Tablet(
+ tablet.getTableName(),
+ tablet.getSchemas(),
+ tablet.getColumnTypes(),
+ tablet.rowSize);
+ }
+ for (int j = 0; j < v.getSchemas().size(); j++) {
+ v.addValue(
+ v.getSchemas().get(j).getMeasurementId(),
+ v.rowSize,
+ tablet.getValue(finalI, j));
+ }
+ v.addTimestamp(v.rowSize, tablet.timestamps[finalI]);
+ v.rowSize++;
+ return v;
+ });
+ }
+ }
+ insertRelationalTabletByGroup(relationalTabletGroup);
+ }
+
+ @SuppressWarnings({
+ "squid:S3776"
+ }) // ignore Cognitive Complexity of methods should not be too high
+ private <T> void insertRelationalTabletByGroup(
+ Map<SessionConnection, Tablet> relationalTabletGroup)
+ throws IoTDBConnectionException, StatementExecutionException {
+ List<CompletableFuture<Void>> completableFutures =
+ relationalTabletGroup.entrySet().stream()
+ .map(
+ entry -> {
+ SessionConnection connection = entry.getKey();
+ Tablet subTablet = entry.getValue();
+ return CompletableFuture.runAsync(
+ () -> {
+ TSInsertTabletReq request = genTSInsertTabletReq(subTablet, false, false);
+ request.setWriteToTable(true);
+ request.setColumnCategories(
+ subTablet.getColumnTypes().stream()
+ .map(t -> (byte) t.ordinal())
+ .collect(Collectors.toList()));
+ InsertConsumer<TSInsertTabletReq> insertConsumer =
+ SessionConnection::insertTablet;
+ try {
+ insertConsumer.insert(connection, request);
+ } catch (RedirectException e) {
+ List<TEndPoint> endPointList = e.getEndPointList();
+ Map<IDeviceID, TEndPoint> endPointMap = new HashMap<>();
+ for (int i = 0; i < endPointList.size(); i++) {
+ if (endPointList.get(i) != null) {
+ endPointMap.put(subTablet.getDeviceID(i), endPointList.get(i));
+ }
+ }
+ endPointMap.forEach(this::handleRedirection);
+ } catch (StatementExecutionException e) {
+ throw new CompletionException(e);
+ } catch (IoTDBConnectionException e) {
+ // remove the broken session
+ removeBrokenSessionConnection(connection);
+ try {
+ insertConsumer.insert(defaultSessionConnection, request);
+ } catch (IoTDBConnectionException | StatementExecutionException ex) {
+ throw new CompletionException(ex);
+ } catch (RedirectException ignored) {
+ }
+ }
+ },
+ OPERATION_EXECUTOR);
+ })
+ .collect(Collectors.toList());
+
+ StringBuilder errMsgBuilder = new StringBuilder();
+ for (CompletableFuture<Void> completableFuture : completableFutures) {
+ try {
+ completableFuture.join();
+ } catch (CompletionException completionException) {
+ Throwable cause = completionException.getCause();
+ logger.error("Meet error when async insert!", cause);
+ if (cause instanceof IoTDBConnectionException) {
+ throw (IoTDBConnectionException) cause;
+ } else {
+ errMsgBuilder.append(cause.getMessage());
Review Comment:
Maybe a separator should be added between the messages?
##########
iotdb-client/session/src/test/java/org/apache/iotdb/session/SessionCacheLeaderTest.java:
##########
@@ -931,6 +1025,161 @@ public void testInsertTabletsWithSessionBroken() throws StatementExecutionExcept
}
}
+ @Test
+ public void testInsertRelationalTabletWithSessionBroken() throws StatementExecutionException {
+ // without leader cache
+ session = new MockSession("127.0.0.1", 55560, false, "table");
+ try {
+ session.open();
+ } catch (IoTDBConnectionException e) {
+ Assert.fail(e.getMessage());
+ }
+ assertNull(session.tableModelDeviceIdToEndpoint);
+ assertNull(session.endPointToSessionConnection);
+
+ // set the session connection as broken
+ ((MockSession) session).getLastConstructedSessionConnection().setConnectionBroken(true);
+
+ String tableName = "table1";
+ List<IMeasurementSchema> schemaList = new ArrayList<>();
+ List<ColumnType> columnTypeList = new ArrayList<>();
+ schemaList.add(new MeasurementSchema("id", TSDataType.STRING));
+ schemaList.add(new MeasurementSchema("s1", TSDataType.INT64));
+ schemaList.add(new MeasurementSchema("s2", TSDataType.INT64));
+ columnTypeList.add(ColumnType.ID);
+ columnTypeList.add(ColumnType.MEASUREMENT);
+ columnTypeList.add(ColumnType.MEASUREMENT);
+ Tablet tablet = new Tablet(tableName, schemaList, columnTypeList, 50);
+ long timestamp = System.currentTimeMillis();
+ for (long row = 0; row < 100; row++) {
+ int rowIndex = tablet.rowSize++;
+ tablet.addTimestamp(rowIndex, timestamp);
+ tablet.addValue(schemaList.get(0).getMeasurementId(), rowIndex, "id" + (rowIndex % 4));
+ for (int s = 1; s < 3; s++) {
+ long value = new Random().nextLong();
+ tablet.addValue(schemaList.get(s).getMeasurementId(), rowIndex, value);
+ }
+
+ if (tablet.rowSize == tablet.getMaxRowNumber()) {
+ try {
+ session.insertRelationalTablet(tablet);
+ } catch (IoTDBConnectionException e) {
+ assertEquals(
+ "the session connection = TEndPoint(ip:127.0.0.1, port:55560) is broken",
+ e.getMessage());
+ }
+ tablet.reset();
+ }
+ timestamp++;
+ }
+
+ if (tablet.rowSize != 0) {
+ try {
+ session.insertRelationalTablet(tablet);
+ } catch (IoTDBConnectionException e) {
+ assertEquals(
+ "the session connection = TEndPoint(ip:127.0.0.1, port:55560) is broken",
+ e.getMessage());
+ }
+ tablet.reset();
+ }
+
+ assertNull(session.tableModelDeviceIdToEndpoint);
+ assertNull(session.endPointToSessionConnection);
+ try {
+ session.close();
+ } catch (IoTDBConnectionException e) {
+ Assert.fail(e.getMessage());
+ }
+
+ // with leader cache
+ // rest the session connection
+ session = new MockSession("127.0.0.1", 55560, true, "table");
+ try {
+ session.open();
+ } catch (IoTDBConnectionException e) {
+ Assert.fail(e.getMessage());
+ }
+ assertEquals(0, session.tableModelDeviceIdToEndpoint.size());
+ assertEquals(1, session.endPointToSessionConnection.size());
+
+ for (long row = 0; row < 100; row++) {
+ int rowIndex = tablet.rowSize++;
+ tablet.addTimestamp(rowIndex, timestamp);
+ tablet.addValue(schemaList.get(0).getMeasurementId(), rowIndex, "id" + (rowIndex % 4));
+ for (int s = 1; s < 3; s++) {
+ long value = new Random().nextLong();
+ tablet.addValue(schemaList.get(s).getMeasurementId(), rowIndex, value);
+ }
+
+ if (tablet.rowSize == tablet.getMaxRowNumber()) {
+ try {
+ session.insertRelationalTablet(tablet);
+ } catch (IoTDBConnectionException e) {
+ assertEquals(
+ "the session connection = TEndPoint(ip:127.0.0.1, port:55560) is broken",
+ e.getMessage());
+ }
+ tablet.reset();
+ }
+ timestamp++;
+ }
+
+ // set the session connection as broken
+ ((MockSession) session).getLastConstructedSessionConnection().setConnectionBroken(true);
+ // set connection as broken, due to we enable the cache leader, when we called
+ // ((MockSession) session).getLastConstructedSessionConnection(), the session's endpoint has
+ // been changed to EndPoint(ip:127.0.0.1, port:55562)
+ Assert.assertEquals(
+ "MockSessionConnection{ endPoint=TEndPoint(ip:127.0.0.1, port:55562)}",
+ ((MockSession) session).getLastConstructedSessionConnection().toString());
+
+ for (long row = 0; row < 100; row++) {
+ int rowIndex = tablet.rowSize++;
+ tablet.addTimestamp(rowIndex, timestamp);
+ tablet.addValue(schemaList.get(0).getMeasurementId(), rowIndex, "id" + (rowIndex % 4));
+ for (int s = 1; s < 3; s++) {
+ long value = new Random().nextLong();
+ tablet.addValue(schemaList.get(s).getMeasurementId(), rowIndex, value);
+ }
+
+ if (tablet.rowSize == tablet.getMaxRowNumber()) {
+ try {
+ session.insertRelationalTablet(tablet);
+ } catch (IoTDBConnectionException e) {
+ assertEquals(
+ "the session connection = TEndPoint(ip:127.0.0.1, port:55560) is broken",
+ e.getMessage());
+ }
Review Comment:
What if the exception is not thrown?
##########
iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java:
##########
@@ -1384,6 +1440,34 @@ private void handleRedirection(String deviceId, TEndPoint endpoint) {
}
}
+ private void handleRedirection(IDeviceID deviceId, TEndPoint endpoint) {
+ if (enableRedirection) {
+ // no need to redirection
+ if (endpoint.ip.equals("0.0.0.0")) {
+ return;
+ }
+ AtomicReference<IoTDBConnectionException> exceptionReference = new AtomicReference<>();
+ if (!tableModelDeviceIdToEndpoint.containsKey(deviceId)
+ || !tableModelDeviceIdToEndpoint.get(deviceId).equals(endpoint)) {
+ tableModelDeviceIdToEndpoint.put(deviceId, endpoint);
+ }
+ SessionConnection connection =
+ endPointToSessionConnection.computeIfAbsent(
+ endpoint,
+ k -> {
+ try {
+ return constructSessionConnection(this, endpoint, zoneId);
+ } catch (IoTDBConnectionException ex) {
+ exceptionReference.set(ex);
+ return null;
+ }
+ });
+ if (connection == null) {
+ tableModelDeviceIdToEndpoint.remove(deviceId);
+ }
+ }
Review Comment:
Where is the exceptionReference used?
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support table model insert redirection [iotdb]
Posted by "HTHou (via GitHub)" <gi...@apache.org>.
HTHou commented on code in PR #13550:
URL: https://github.com/apache/iotdb/pull/13550#discussion_r1776293378
##########
iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java:
##########
@@ -2697,6 +2790,111 @@ public void insertRelationalTablet(Tablet tablet)
insertRelationalTablet(tablet, false);
}
+ private void insertRelationalTabletWithLeaderCache(Tablet tablet)
+ throws IoTDBConnectionException, StatementExecutionException {
+ Map<SessionConnection, Tablet> relationalTabletGroup = new HashMap<>();
+ if (tableModelDeviceIdToEndpoint.isEmpty()) {
+ relationalTabletGroup.put(defaultSessionConnection, tablet);
+ } else {
+ for (int i = 0; i < tablet.rowSize; i++) {
+ IDeviceID iDeviceID = tablet.getDeviceID(i);
+ final SessionConnection connection = getSessionConnection(iDeviceID);
+ int finalI = i;
+ relationalTabletGroup.compute(
+ connection,
+ (k, v) -> {
+ if (v == null) {
+ v =
+ new Tablet(
+ tablet.getTableName(),
+ tablet.getSchemas(),
+ tablet.getColumnTypes(),
+ tablet.rowSize);
+ }
+ for (int j = 0; j < v.getSchemas().size(); j++) {
+ v.addValue(
+ v.getSchemas().get(j).getMeasurementId(),
+ v.rowSize,
+ tablet.getValue(finalI, j));
+ }
+ v.addTimestamp(v.rowSize, tablet.timestamps[finalI]);
+ v.rowSize++;
+ return v;
+ });
+ }
+ }
+ insertRelationalTabletByGroup(relationalTabletGroup);
+ }
+
+ @SuppressWarnings({
+ "squid:S3776"
+ }) // ignore Cognitive Complexity of methods should not be too high
+ private <T> void insertRelationalTabletByGroup(
Review Comment:
removed
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Draft]Support table model redirect [iotdb]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #13550:
URL: https://github.com/apache/iotdb/pull/13550#issuecomment-2362533277
## [](https://sonarcloud.io/dashboard?id=apache_iotdb&pullRequest=13550) **Quality Gate failed**
Failed conditions
 [12.6% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_iotdb&pullRequest=13550&metric=new_duplicated_lines_density&view=list) (required ≤ 3%)
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache_iotdb&pullRequest=13550)
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support table model insert redirection [iotdb]
Posted by "HTHou (via GitHub)" <gi...@apache.org>.
HTHou commented on code in PR #13550:
URL: https://github.com/apache/iotdb/pull/13550#discussion_r1776292865
##########
iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java:
##########
@@ -1384,6 +1440,34 @@ private void handleRedirection(String deviceId, TEndPoint endpoint) {
}
}
+ private void handleRedirection(IDeviceID deviceId, TEndPoint endpoint) {
+ if (enableRedirection) {
+ // no need to redirection
+ if (endpoint.ip.equals("0.0.0.0")) {
+ return;
+ }
+ AtomicReference<IoTDBConnectionException> exceptionReference = new AtomicReference<>();
+ if (!tableModelDeviceIdToEndpoint.containsKey(deviceId)
+ || !tableModelDeviceIdToEndpoint.get(deviceId).equals(endpoint)) {
+ tableModelDeviceIdToEndpoint.put(deviceId, endpoint);
+ }
+ SessionConnection connection =
+ endPointToSessionConnection.computeIfAbsent(
+ endpoint,
+ k -> {
+ try {
+ return constructSessionConnection(this, endpoint, zoneId);
+ } catch (IoTDBConnectionException ex) {
+ exceptionReference.set(ex);
+ return null;
+ }
+ });
+ if (connection == null) {
+ tableModelDeviceIdToEndpoint.remove(deviceId);
+ }
+ }
Review Comment:
no idea either, just copied from old code. Let me remove it
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Draft]Support table model insert redirection [iotdb]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #13550:
URL: https://github.com/apache/iotdb/pull/13550#issuecomment-2363426740
## [](https://sonarcloud.io/dashboard?id=apache_iotdb&pullRequest=13550) **Quality Gate failed**
Failed conditions
 [10.9% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_iotdb&pullRequest=13550&metric=new_duplicated_lines_density&view=list) (required ≤ 3%)
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache_iotdb&pullRequest=13550)
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Draft]Support table model insert redirection [iotdb]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #13550:
URL: https://github.com/apache/iotdb/pull/13550#issuecomment-2367431403
## [](https://sonarcloud.io/dashboard?id=apache_iotdb&pullRequest=13550) **Quality Gate failed**
Failed conditions
 [6.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_iotdb&pullRequest=13550&metric=new_duplicated_lines_density&view=list) (required ≤ 3%)
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache_iotdb&pullRequest=13550)
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support table model insert redirection [iotdb]
Posted by "HTHou (via GitHub)" <gi...@apache.org>.
HTHou commented on code in PR #13550:
URL: https://github.com/apache/iotdb/pull/13550#discussion_r1776336165
##########
iotdb-client/isession/src/main/java/org/apache/iotdb/isession/IPooledSession.java:
##########
@@ -28,6 +28,7 @@
import org.apache.thrift.TException;
import org.apache.tsfile.write.record.Tablet;
+/** NOTICE: IPooledSession is specific to the table model. */
public interface IPooledSession extends AutoCloseable {
Review Comment:
No, session doesn't depend on node-commons module.
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Draft]Support table model redirect [iotdb]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #13550:
URL: https://github.com/apache/iotdb/pull/13550#issuecomment-2360677486
## [](https://sonarcloud.io/dashboard?id=apache_iotdb&pullRequest=13550) **Quality Gate failed**
Failed conditions
 [12.6% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_iotdb&pullRequest=13550&metric=new_duplicated_lines_density&view=list) (required ≤ 3%)
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache_iotdb&pullRequest=13550)
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Draft]Support table model redirect [iotdb]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #13550:
URL: https://github.com/apache/iotdb/pull/13550#issuecomment-2362554038
## [](https://sonarcloud.io/dashboard?id=apache_iotdb&pullRequest=13550) **Quality Gate failed**
Failed conditions
 [12.3% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_iotdb&pullRequest=13550&metric=new_duplicated_lines_density&view=list) (required ≤ 3%)
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache_iotdb&pullRequest=13550)
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support table model insert redirection [iotdb]
Posted by "HTHou (via GitHub)" <gi...@apache.org>.
HTHou commented on code in PR #13550:
URL: https://github.com/apache/iotdb/pull/13550#discussion_r1776295219
##########
iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java:
##########
@@ -2697,6 +2790,111 @@ public void insertRelationalTablet(Tablet tablet)
insertRelationalTablet(tablet, false);
}
+ private void insertRelationalTabletWithLeaderCache(Tablet tablet)
+ throws IoTDBConnectionException, StatementExecutionException {
+ Map<SessionConnection, Tablet> relationalTabletGroup = new HashMap<>();
+ if (tableModelDeviceIdToEndpoint.isEmpty()) {
+ relationalTabletGroup.put(defaultSessionConnection, tablet);
+ } else {
+ for (int i = 0; i < tablet.rowSize; i++) {
+ IDeviceID iDeviceID = tablet.getDeviceID(i);
+ final SessionConnection connection = getSessionConnection(iDeviceID);
+ int finalI = i;
+ relationalTabletGroup.compute(
+ connection,
+ (k, v) -> {
+ if (v == null) {
+ v =
+ new Tablet(
+ tablet.getTableName(),
+ tablet.getSchemas(),
+ tablet.getColumnTypes(),
+ tablet.rowSize);
+ }
+ for (int j = 0; j < v.getSchemas().size(); j++) {
+ v.addValue(
+ v.getSchemas().get(j).getMeasurementId(),
+ v.rowSize,
+ tablet.getValue(finalI, j));
+ }
+ v.addTimestamp(v.rowSize, tablet.timestamps[finalI]);
+ v.rowSize++;
+ return v;
+ });
+ }
+ }
+ insertRelationalTabletByGroup(relationalTabletGroup);
+ }
+
+ @SuppressWarnings({
+ "squid:S3776"
+ }) // ignore Cognitive Complexity of methods should not be too high
+ private <T> void insertRelationalTabletByGroup(
+ Map<SessionConnection, Tablet> relationalTabletGroup)
+ throws IoTDBConnectionException, StatementExecutionException {
+ List<CompletableFuture<Void>> completableFutures =
+ relationalTabletGroup.entrySet().stream()
+ .map(
+ entry -> {
+ SessionConnection connection = entry.getKey();
+ Tablet subTablet = entry.getValue();
+ return CompletableFuture.runAsync(
+ () -> {
+ TSInsertTabletReq request = genTSInsertTabletReq(subTablet, false, false);
+ request.setWriteToTable(true);
+ request.setColumnCategories(
+ subTablet.getColumnTypes().stream()
+ .map(t -> (byte) t.ordinal())
+ .collect(Collectors.toList()));
+ InsertConsumer<TSInsertTabletReq> insertConsumer =
+ SessionConnection::insertTablet;
+ try {
+ insertConsumer.insert(connection, request);
+ } catch (RedirectException e) {
+ List<TEndPoint> endPointList = e.getEndPointList();
+ Map<IDeviceID, TEndPoint> endPointMap = new HashMap<>();
+ for (int i = 0; i < endPointList.size(); i++) {
+ if (endPointList.get(i) != null) {
+ endPointMap.put(subTablet.getDeviceID(i), endPointList.get(i));
+ }
+ }
+ endPointMap.forEach(this::handleRedirection);
+ } catch (StatementExecutionException e) {
+ throw new CompletionException(e);
+ } catch (IoTDBConnectionException e) {
+ // remove the broken session
+ removeBrokenSessionConnection(connection);
+ try {
+ insertConsumer.insert(defaultSessionConnection, request);
+ } catch (IoTDBConnectionException | StatementExecutionException ex) {
+ throw new CompletionException(ex);
+ } catch (RedirectException ignored) {
+ }
+ }
+ },
+ OPERATION_EXECUTOR);
+ })
+ .collect(Collectors.toList());
+
+ StringBuilder errMsgBuilder = new StringBuilder();
+ for (CompletableFuture<Void> completableFuture : completableFutures) {
+ try {
+ completableFuture.join();
+ } catch (CompletionException completionException) {
+ Throwable cause = completionException.getCause();
+ logger.error("Meet error when async insert!", cause);
+ if (cause instanceof IoTDBConnectionException) {
+ throw (IoTDBConnectionException) cause;
+ } else {
+ errMsgBuilder.append(cause.getMessage());
Review Comment:
Makes sense.
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support table model insert redirection [iotdb]
Posted by "HTHou (via GitHub)" <gi...@apache.org>.
HTHou commented on code in PR #13550:
URL: https://github.com/apache/iotdb/pull/13550#discussion_r1776330734
##########
iotdb-client/session/src/main/java/org/apache/iotdb/session/pool/SessionPool.java:
##########
@@ -703,7 +709,16 @@ private ISession getSession() throws IoTDBConnectionException {
session = constructNewSession();
try {
- session.open(enableCompression, connectionTimeoutInMs, deviceIdToEndpoint, availableNodes);
+ if (sqlDialect.equals("tree")) {
+ session.open(
+ enableCompression, connectionTimeoutInMs, deviceIdToEndpoint, availableNodes);
+ } else {
+ session.open(
+ enableCompression,
+ connectionTimeoutInMs,
+ availableNodes,
+ tableModelDeviceIdToEndpoint);
+ }
Review Comment:
`sqlDialect.equals("tree")` removed
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support table model insert redirection [iotdb]
Posted by "HTHou (via GitHub)" <gi...@apache.org>.
HTHou commented on code in PR #13550:
URL: https://github.com/apache/iotdb/pull/13550#discussion_r1776336165
##########
iotdb-client/isession/src/main/java/org/apache/iotdb/isession/IPooledSession.java:
##########
@@ -28,6 +28,7 @@
import org.apache.thrift.TException;
import org.apache.tsfile.write.record.Tablet;
+/** NOTICE: IPooledSession is specific to the table model. */
public interface IPooledSession extends AutoCloseable {
Review Comment:
No, session doesn't depends on node-commons module.
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support table model insert redirection [iotdb]
Posted by "HTHou (via GitHub)" <gi...@apache.org>.
HTHou commented on code in PR #13550:
URL: https://github.com/apache/iotdb/pull/13550#discussion_r1776324075
##########
iotdb-client/session/src/test/java/org/apache/iotdb/session/SessionCacheLeaderTest.java:
##########
@@ -931,6 +1025,161 @@ public void testInsertTabletsWithSessionBroken() throws StatementExecutionExcept
}
}
+ @Test
+ public void testInsertRelationalTabletWithSessionBroken() throws StatementExecutionException {
+ // without leader cache
+ session = new MockSession("127.0.0.1", 55560, false, "table");
+ try {
+ session.open();
+ } catch (IoTDBConnectionException e) {
+ Assert.fail(e.getMessage());
+ }
+ assertNull(session.tableModelDeviceIdToEndpoint);
+ assertNull(session.endPointToSessionConnection);
+
+ // set the session connection as broken
+ ((MockSession) session).getLastConstructedSessionConnection().setConnectionBroken(true);
+
+ String tableName = "table1";
+ List<IMeasurementSchema> schemaList = new ArrayList<>();
+ List<ColumnType> columnTypeList = new ArrayList<>();
+ schemaList.add(new MeasurementSchema("id", TSDataType.STRING));
+ schemaList.add(new MeasurementSchema("s1", TSDataType.INT64));
+ schemaList.add(new MeasurementSchema("s2", TSDataType.INT64));
+ columnTypeList.add(ColumnType.ID);
+ columnTypeList.add(ColumnType.MEASUREMENT);
+ columnTypeList.add(ColumnType.MEASUREMENT);
+ Tablet tablet = new Tablet(tableName, schemaList, columnTypeList, 50);
+ long timestamp = System.currentTimeMillis();
+ for (long row = 0; row < 100; row++) {
+ int rowIndex = tablet.rowSize++;
+ tablet.addTimestamp(rowIndex, timestamp);
+ tablet.addValue(schemaList.get(0).getMeasurementId(), rowIndex, "id" + (rowIndex % 4));
+ for (int s = 1; s < 3; s++) {
+ long value = new Random().nextLong();
+ tablet.addValue(schemaList.get(s).getMeasurementId(), rowIndex, value);
+ }
+
+ if (tablet.rowSize == tablet.getMaxRowNumber()) {
+ try {
+ session.insertRelationalTablet(tablet);
+ } catch (IoTDBConnectionException e) {
+ assertEquals(
+ "the session connection = TEndPoint(ip:127.0.0.1, port:55560) is broken",
+ e.getMessage());
+ }
+ tablet.reset();
+ }
+ timestamp++;
+ }
+
+ if (tablet.rowSize != 0) {
+ try {
+ session.insertRelationalTablet(tablet);
+ } catch (IoTDBConnectionException e) {
+ assertEquals(
+ "the session connection = TEndPoint(ip:127.0.0.1, port:55560) is broken",
+ e.getMessage());
+ }
+ tablet.reset();
+ }
+
+ assertNull(session.tableModelDeviceIdToEndpoint);
+ assertNull(session.endPointToSessionConnection);
+ try {
+ session.close();
+ } catch (IoTDBConnectionException e) {
+ Assert.fail(e.getMessage());
+ }
+
+ // with leader cache
+ // rest the session connection
+ session = new MockSession("127.0.0.1", 55560, true, "table");
+ try {
+ session.open();
+ } catch (IoTDBConnectionException e) {
+ Assert.fail(e.getMessage());
+ }
+ assertEquals(0, session.tableModelDeviceIdToEndpoint.size());
+ assertEquals(1, session.endPointToSessionConnection.size());
+
+ for (long row = 0; row < 100; row++) {
+ int rowIndex = tablet.rowSize++;
+ tablet.addTimestamp(rowIndex, timestamp);
+ tablet.addValue(schemaList.get(0).getMeasurementId(), rowIndex, "id" + (rowIndex % 4));
+ for (int s = 1; s < 3; s++) {
+ long value = new Random().nextLong();
+ tablet.addValue(schemaList.get(s).getMeasurementId(), rowIndex, value);
+ }
+
+ if (tablet.rowSize == tablet.getMaxRowNumber()) {
+ try {
+ session.insertRelationalTablet(tablet);
+ } catch (IoTDBConnectionException e) {
+ assertEquals(
+ "the session connection = TEndPoint(ip:127.0.0.1, port:55560) is broken",
+ e.getMessage());
+ }
+ tablet.reset();
+ }
+ timestamp++;
+ }
+
+ // set the session connection as broken
+ ((MockSession) session).getLastConstructedSessionConnection().setConnectionBroken(true);
+ // set connection as broken, due to we enable the cache leader, when we called
+ // ((MockSession) session).getLastConstructedSessionConnection(), the session's endpoint has
+ // been changed to EndPoint(ip:127.0.0.1, port:55562)
+ Assert.assertEquals(
+ "MockSessionConnection{ endPoint=TEndPoint(ip:127.0.0.1, port:55562)}",
+ ((MockSession) session).getLastConstructedSessionConnection().toString());
+
+ for (long row = 0; row < 100; row++) {
+ int rowIndex = tablet.rowSize++;
+ tablet.addTimestamp(rowIndex, timestamp);
+ tablet.addValue(schemaList.get(0).getMeasurementId(), rowIndex, "id" + (rowIndex % 4));
+ for (int s = 1; s < 3; s++) {
+ long value = new Random().nextLong();
+ tablet.addValue(schemaList.get(s).getMeasurementId(), rowIndex, value);
+ }
+
+ if (tablet.rowSize == tablet.getMaxRowNumber()) {
+ try {
+ session.insertRelationalTablet(tablet);
+ } catch (IoTDBConnectionException e) {
+ assertEquals(
+ "the session connection = TEndPoint(ip:127.0.0.1, port:55560) is broken",
+ e.getMessage());
+ }
Review Comment:
Fixed
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Draft]Support table model redirect [iotdb]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #13550:
URL: https://github.com/apache/iotdb/pull/13550#issuecomment-2362637379
## [Codecov](https://app.codecov.io/gh/apache/iotdb/pull/13550?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
Attention: Patch coverage is `25.43353%` with `129 lines` in your changes missing coverage. Please review.
> Project coverage is 41.76%. Comparing base [(`5387a10`)](https://app.codecov.io/gh/apache/iotdb/commit/5387a10254378696693ef979b78350457f5fc2d0?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`459b323`)](https://app.codecov.io/gh/apache/iotdb/commit/459b323943262ae55a7305f3700153bc4bd459b8?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
| [Files with missing lines](https://app.codecov.io/gh/apache/iotdb/pull/13550?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [...rc/main/java/org/apache/iotdb/session/Session.java](https://app.codecov.io/gh/apache/iotdb/pull/13550?src=pr&el=tree&filepath=iotdb-client%2Fsession%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fiotdb%2Fsession%2FSession.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aW90ZGItY2xpZW50L3Nlc3Npb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2lvdGRiL3Nlc3Npb24vU2Vzc2lvbi5qYXZh) | 1.01% | [98 Missing :warning: ](https://app.codecov.io/gh/apache/iotdb/pull/13550?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...ine/plan/relational/planner/TableModelPlanner.java](https://app.codecov.io/gh/apache/iotdb/pull/13550?src=pr&el=tree&filepath=iotdb-core%2Fdatanode%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fiotdb%2Fdb%2Fqueryengine%2Fplan%2Frelational%2Fplanner%2FTableModelPlanner.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aW90ZGItY29yZS9kYXRhbm9kZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvaW90ZGIvZGIvcXVlcnllbmdpbmUvcGxhbi9yZWxhdGlvbmFsL3BsYW5uZXIvVGFibGVNb2RlbFBsYW5uZXIuamF2YQ==) | 0.00% | [22 Missing :warning: ](https://app.codecov.io/gh/apache/iotdb/pull/13550?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...n/java/org/apache/iotdb/rpc/RedirectException.java](https://app.codecov.io/gh/apache/iotdb/pull/13550?src=pr&el=tree&filepath=iotdb-client%2Fservice-rpc%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fiotdb%2Frpc%2FRedirectException.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aW90ZGItY2xpZW50L3NlcnZpY2UtcnBjL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9pb3RkYi9ycGMvUmVkaXJlY3RFeGNlcHRpb24uamF2YQ==) | 37.50% | [5 Missing :warning: ](https://app.codecov.io/gh/apache/iotdb/pull/13550?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...c/src/main/java/org/apache/iotdb/rpc/RpcUtils.java](https://app.codecov.io/gh/apache/iotdb/pull/13550?src=pr&el=tree&filepath=iotdb-client%2Fservice-rpc%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fiotdb%2Frpc%2FRpcUtils.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aW90ZGItY2xpZW50L3NlcnZpY2UtcnBjL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9pb3RkYi9ycGMvUnBjVXRpbHMuamF2YQ==) | 76.92% | [3 Missing :warning: ](https://app.codecov.io/gh/apache/iotdb/pull/13550?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...queryengine/plan/relational/analyzer/Analysis.java](https://app.codecov.io/gh/apache/iotdb/pull/13550?src=pr&el=tree&filepath=iotdb-core%2Fdatanode%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fiotdb%2Fdb%2Fqueryengine%2Fplan%2Frelational%2Fanalyzer%2FAnalysis.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aW90ZGItY29yZS9kYXRhbm9kZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvaW90ZGIvZGIvcXVlcnllbmdpbmUvcGxhbi9yZWxhdGlvbmFsL2FuYWx5emVyL0FuYWx5c2lzLmphdmE=) | 0.00% | [1 Missing :warning: ](https://app.codecov.io/gh/apache/iotdb/pull/13550?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #13550 +/- ##
============================================
- Coverage 41.78% 41.76% -0.02%
Complexity 71 71
============================================
Files 3977 3977
Lines 247417 247581 +164
Branches 29959 29987 +28
============================================
+ Hits 103379 103411 +32
- Misses 144038 144170 +132
```
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/iotdb/pull/13550?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Draft]Support table model insert redirection [iotdb]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #13550:
URL: https://github.com/apache/iotdb/pull/13550#issuecomment-2367170619
## [](https://sonarcloud.io/dashboard?id=apache_iotdb&pullRequest=13550) **Quality Gate failed**
Failed conditions
 [8.5% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_iotdb&pullRequest=13550&metric=new_duplicated_lines_density&view=list) (required ≤ 3%)
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache_iotdb&pullRequest=13550)
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support table model insert redirection [iotdb]
Posted by "jt2594838 (via GitHub)" <gi...@apache.org>.
jt2594838 merged PR #13550:
URL: https://github.com/apache/iotdb/pull/13550
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support table model insert redirection [iotdb]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #13550:
URL: https://github.com/apache/iotdb/pull/13550#issuecomment-2375845579
## [](https://sonarcloud.io/dashboard?id=apache_iotdb&pullRequest=13550) **Quality Gate failed**
Failed conditions
 [8.5% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_iotdb&pullRequest=13550&metric=new_duplicated_lines_density&view=list) (required ≤ 3%)
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache_iotdb&pullRequest=13550)
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support table model insert redirection [iotdb]
Posted by "jt2594838 (via GitHub)" <gi...@apache.org>.
jt2594838 commented on code in PR #13550:
URL: https://github.com/apache/iotdb/pull/13550#discussion_r1776284367
##########
iotdb-client/isession/src/main/java/org/apache/iotdb/isession/IPooledSession.java:
##########
@@ -28,6 +28,7 @@
import org.apache.thrift.TException;
import org.apache.tsfile.write.record.Tablet;
+/** NOTICE: IPooledSession is specific to the table model. */
public interface IPooledSession extends AutoCloseable {
Review Comment:
How about moving it to the common module? If session depends on it, too.
--
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: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org