This is an automated email from the ASF dual-hosted git repository.

caogaofei pushed a commit to branch benchants_branch
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/benchants_branch by this push:
     new d6d2e5884c5 return emptyList in method getPathModifications
d6d2e5884c5 is described below

commit d6d2e5884c5f0cb92892365e23d58f38a2368501
Author: Beyyes <[email protected]>
AuthorDate: Fri May 26 17:41:11 2023 +0800

    return emptyList in method getPathModifications
---
 .../iotdb/db/query/context/QueryContext.java       | 41 +++++++++++-----------
 1 file changed, 21 insertions(+), 20 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 2a44762fddd..2f2ea9edef7 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,27 +93,29 @@ public class QueryContext {
    */
   public List<Modification> getPathModifications(ModificationFile modFile, 
PartialPath path) {
     // TODO change a way to do the existing check to avoid this IO call each 
time.
+    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));
-        });
+    //    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) {

Reply via email to