You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by "BUAAserein (via GitHub)" <gi...@apache.org> on 2023/07/13 09:13:50 UTC
[GitHub] [iotdb] BUAAserein opened a new pull request, #10546: [IOTDB-6066] Add ConfigNode timeslot metric
BUAAserein opened a new pull request, #10546:
URL: https://github.com/apache/iotdb/pull/10546
see [jira](https://issues.apache.org/jira/browse/IOTDB-6066)
--
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
[GitHub] [iotdb] SpriCoder merged pull request #10546: [IOTDB-6066] Add ConfigNode timeslot metric
Posted by "SpriCoder (via GitHub)" <gi...@apache.org>.
SpriCoder merged PR #10546:
URL: https://github.com/apache/iotdb/pull/10546
--
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
[GitHub] [iotdb] BUAAserein commented on a diff in pull request #10546: [IOTDB-6066] Add ConfigNode timeslot metric
Posted by "BUAAserein (via GitHub)" <gi...@apache.org>.
BUAAserein commented on code in PR #10546:
URL: https://github.com/apache/iotdb/pull/10546#discussion_r1262351072
##########
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/partition/PartitionInfo.java:
##########
@@ -734,6 +734,26 @@ public int getAssignedSeriesPartitionSlotsCount(String database) {
return databasePartitionTables.get(database).getAssignedSeriesPartitionSlotsCount();
}
+ /**
+ * Only leader use this interface.
+ *
+ * <p>Get the assigned TimePartitionSlots count in the specified Database
+ *
+ * @param database The specified Database
+ * @return The assigned TimePartitionSlots count
+ */
+ public long getAssignedTimePartitionSlotsCount(String database) {
Review Comment:
OK
--
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
[GitHub] [iotdb] OneSizeFitsQuorum commented on a diff in pull request #10546: [IOTDB-6066] Add ConfigNode timeslot metric
Posted by "OneSizeFitsQuorum (via GitHub)" <gi...@apache.org>.
OneSizeFitsQuorum commented on code in PR #10546:
URL: https://github.com/apache/iotdb/pull/10546#discussion_r1262273448
##########
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/partition/PartitionInfo.java:
##########
@@ -734,6 +734,26 @@ public int getAssignedSeriesPartitionSlotsCount(String database) {
return databasePartitionTables.get(database).getAssignedSeriesPartitionSlotsCount();
}
+ /**
+ * Only leader use this interface.
+ *
+ * <p>Get the assigned TimePartitionSlots count in the specified Database
+ *
+ * @param database The specified Database
+ * @return The assigned TimePartitionSlots count
+ */
+ public long getAssignedTimePartitionSlotsCount(String database) {
+ return databasePartitionTables.get(database)
+ .getTimeSlotList(
+ new TSeriesPartitionSlot(-1),
+ new TConsensusGroupId(TConsensusGroupType.DataRegion, -1),
+ -9223372036854775808L,
Review Comment:
LONG.MIN_VALUE
##########
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/partition/PartitionInfo.java:
##########
@@ -734,6 +734,26 @@ public int getAssignedSeriesPartitionSlotsCount(String database) {
return databasePartitionTables.get(database).getAssignedSeriesPartitionSlotsCount();
}
+ /**
+ * Only leader use this interface.
+ *
+ * <p>Get the assigned TimePartitionSlots count in the specified Database
+ *
+ * @param database The specified Database
+ * @return The assigned TimePartitionSlots count
+ */
+ public long getAssignedTimePartitionSlotsCount(String database) {
+ return databasePartitionTables.get(database)
+ .getTimeSlotList(
+ new TSeriesPartitionSlot(-1),
+ new TConsensusGroupId(TConsensusGroupType.DataRegion, -1),
+ -9223372036854775808L,
+ 9223372036854775807L)
Review Comment:
LONG.MAX_VALUE
##########
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/partition/PartitionInfo.java:
##########
@@ -734,6 +734,26 @@ public int getAssignedSeriesPartitionSlotsCount(String database) {
return databasePartitionTables.get(database).getAssignedSeriesPartitionSlotsCount();
}
+ /**
+ * Only leader use this interface.
+ *
+ * <p>Get the assigned TimePartitionSlots count in the specified Database
+ *
+ * @param database The specified Database
+ * @return The assigned TimePartitionSlots count
+ */
+ public long getAssignedTimePartitionSlotsCount(String database) {
Review Comment:
Instead of calling the existing function to generate the array and then summing it, which can increase gc pressure, I recommend separating out the function to compute a long directly
--
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