Caideyipi commented on code in PR #17664:
URL: https://github.com/apache/iotdb/pull/17664#discussion_r3295903160
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/cache/TableDeviceSchemaCache.java:
##########
@@ -482,7 +482,7 @@ void invalidateLastCache(final PartialPath devicePath,
final String measurement)
},
cachedDeviceID -> {
try {
- return new PartialPath(cachedDeviceID).matchFullPath(devicePath);
+ return devicePath.matchFullPath(cachedDeviceID);
Review Comment:
Done. Added a PR description bullet for the wildcard tree last-cache
invalidation fix and added
TreeDeviceSchemaCacheManagerTest#testInvalidateLastCacheByWildcardDevicePath to
cover the wildcard device-path case.
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/SchemaEngine.java:
##########
@@ -371,11 +371,13 @@ public int getSchemaRegionNumber() {
public Map<Integer, Long> countDeviceNumBySchemaRegion(final List<Integer>
schemaIds) {
final Map<Integer, Long> deviceNum = new HashMap<>();
+ final java.util.Collection<Integer> targetSchemaIds =
Review Comment:
Done in latest push. SchemaEngine now imports Collection and HashSet instead
of using inline fully-qualified names.
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/StorageEngine.java:
##########
@@ -1116,12 +1116,14 @@ private void
stopTimedServiceAndThrow(ScheduledExecutorService pool, String pool
public void getDiskSizeByDataRegion(
Map<Integer, Long> dataRegionDisk, List<Integer> dataRegionIds) {
- dataRegionMap.forEach(
- (dataRegionId, dataRegion) -> {
- if (dataRegionIds.contains(dataRegionId.getId())) {
- dataRegionDisk.put(dataRegionId.getId(),
dataRegion.countRegionDiskSize());
- }
- });
+ final java.util.Collection<Integer> targetDataRegionIds =
Review Comment:
Done in latest push. StorageEngine now imports Collection and HashSet
instead of using inline fully-qualified names.
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/read/filescan/impl/ClosedFileScanHandleImpl.java:
##########
@@ -87,10 +87,18 @@ public boolean isDeviceTimeDeleted(IDeviceID deviceID, long
timestamp)
curFileModEntries != null
? curFileModEntries
: queryContext.loadAllModificationsFromDisk(tsFileResource);
- List<ModEntry> modifications =
queryContext.getPathModifications(curFileModEntries, deviceID);
List<TimeRange> timeRangeList =
-
modifications.stream().map(ModEntry::getTimeRange).collect(Collectors.toList());
- return ModificationUtils.isPointDeletedWithoutOrderedRange(timestamp,
timeRangeList);
+
getMergedTimeRanges(queryContext.getPathModifications(curFileModEntries,
deviceID));
Review Comment:
Done. ClosedFileScanHandleImpl now has a deviceToDeletionRanges cache for
merged device-level ranges, using putIfAbsent for concurrent-safe lazy
publication.
--
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]