jt2594838 commented on code in PR #15290:
URL: https://github.com/apache/iotdb/pull/15290#discussion_r2038911847
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/modification/TreeDeletionEntry.java:
##########
@@ -133,16 +134,17 @@ public boolean affects(IDeviceID deviceID, long
startTime, long endTime) {
@Override
public boolean affects(IDeviceID deviceID) {
try {
+ PartialPath deviceIdPath =
+
DataNodeDevicePathCache.getInstance().getPartialPath(deviceID.toString());
Review Comment:
Is it possible that we simply use deviceId as the key? toString may be
costly for DeviceId.
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/executor/fast/SeriesCompactionExecutor.java:
##########
@@ -475,16 +476,16 @@ protected void removeFile(FileElement fileElement) throws
IllegalPathException,
/**
* Get the modifications of a timeseries in the ModificationFile of a
TsFile. Create ttl
* modification from ttl cache.
- *
- * @param path name of the time series
*/
protected List<ModEntry> getModificationsFromCache(
- TsFileResource tsFileResource, PartialPath path) {
+ TsFileResource tsFileResource, IDeviceID deviceId, String measurement)
+ throws IllegalPathException {
PatternTreeMap<ModEntry, PatternTreeMapFactory.ModsSerializer>
allModifications =
modificationCacheMap.get(tsFileResource.getTsFile().getName());
if (allModifications == null) {
return Collections.emptyList();
}
+ PartialPath path = CompactionPathUtils.getPath(deviceId, measurement);
Review Comment:
Can we avoid using PartialPath here? If so, maybe we can remove
CompactionPathUtils.getPath completely and void array copy.
--
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]