You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by hu...@apache.org on 2022/12/06 01:42:03 UTC
[iotdb] 03/07: tmp skip getPathModifications
This is an automated email from the ASF dual-hosted git repository.
hui pushed a commit to branch lmh/OptSingleGroupby
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 2bc25671aaef4b60acc692c2006bc834e4815819
Author: Minghui Liu <li...@foxmail.com>
AuthorDate: Mon Dec 5 22:48:07 2022 +0800
tmp skip getPathModifications
---
.../iotdb/db/query/context/QueryContext.java | 43 +++++++++++-----------
1 file changed, 22 insertions(+), 21 deletions(-)
diff --git a/server/src/main/java/org/apache/iotdb/db/query/context/QueryContext.java b/server/src/main/java/org/apache/iotdb/db/query/context/QueryContext.java
index 60cffd8226..83dfeb478d 100644
--- a/server/src/main/java/org/apache/iotdb/db/query/context/QueryContext.java
+++ b/server/src/main/java/org/apache/iotdb/db/query/context/QueryContext.java
@@ -25,7 +25,6 @@ import org.apache.iotdb.commons.path.PatternTreeMap;
import org.apache.iotdb.db.engine.modification.Deletion;
import org.apache.iotdb.db.engine.modification.Modification;
import org.apache.iotdb.db.engine.modification.ModificationFile;
-import org.apache.iotdb.db.metadata.path.PatternTreeMapFactory;
import org.apache.iotdb.db.metadata.path.PatternTreeMapFactory.ModsSerializer;
import org.apache.iotdb.tsfile.file.metadata.IChunkMetadata;
@@ -94,26 +93,28 @@ public class QueryContext {
* them from 'modFile' and put then into the cache.
*/
public List<Modification> getPathModifications(ModificationFile modFile, PartialPath path) {
- // if the mods file does not exist, do not add it to the cache
- if (!modFile.exists()) {
- return Collections.emptyList();
- }
- Map<String, List<Modification>> fileModifications =
- filePathModCache.computeIfAbsent(modFile.getFilePath(), k -> new ConcurrentHashMap<>());
- return fileModifications.computeIfAbsent(
- path.getFullPath(),
- k -> {
- PatternTreeMap<Modification, ModsSerializer> allModifications =
- fileModCache.get(modFile.getFilePath());
- if (allModifications == null) {
- allModifications = PatternTreeMapFactory.getModsPatternTreeMap();
- for (Modification modification : modFile.getModifications()) {
- allModifications.append(modification.getPath(), modification);
- }
- fileModCache.put(modFile.getFilePath(), allModifications);
- }
- return sortAndMerge(allModifications.getOverlapped(path));
- });
+ return Collections.emptyList();
+ // // if the mods file does not exist, do not add it to the cache
+ // if (!modFile.exists()) {
+ // return Collections.emptyList();
+ // }
+ // Map<String, List<Modification>> fileModifications =
+ // filePathModCache.computeIfAbsent(modFile.getFilePath(), k -> new
+ // ConcurrentHashMap<>());
+ // return fileModifications.computeIfAbsent(
+ // path.getFullPath(),
+ // k -> {
+ // PatternTreeMap<Modification, ModsSerializer> allModifications =
+ // fileModCache.get(modFile.getFilePath());
+ // if (allModifications == null) {
+ // allModifications = PatternTreeMapFactory.getModsPatternTreeMap();
+ // for (Modification modification : modFile.getModifications()) {
+ // allModifications.append(modification.getPath(), modification);
+ // }
+ // fileModCache.put(modFile.getFilePath(), allModifications);
+ // }
+ // return sortAndMerge(allModifications.getOverlapped(path));
+ // });
}
private List<Modification> sortAndMerge(List<Modification> modifications) {