Skip to content
Permalink
Browse files
[IOTDB-4225] Fix QueryContext occupies too much memory
THUMarkLau committed Aug 26, 2022
1 parent 1a2e5d7 commit e5e4f17f703fa7c8e7623d0a8d3120acb0e89fa6
Showing 1 changed file with 5 additions and 0 deletions.
* Find the modifications of timeseries 'path' in 'modFile'. If they are not in the cache, read
* 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<>());

COLLECTOR-SAHAB / covering test: DeletionQueryTest

modFile.random.seed.value=67719771505086 only occurs in the patched version.

COLLECTOR-SAHAB / covering test: DeletionQueryTest

modFile.random.seed.value=68516385925302 only occurs in the original version.

return fileModifications.computeIfAbsent(
path.getFullPath(),
k -> {
List<Modification> allModifications = fileModCache.get(modFile.getFilePath());
if (allModifications == null) {
allModifications = (List<Modification>) modFile.getModifications();
fileModCache.put(modFile.getFilePath(), allModifications);
}
List<Modification> finalPathModifications = new ArrayList<>();
if (!allModifications.isEmpty()) {
allModifications.forEach(
modification -> {
if (modification.getPath().matchFullPath(path)) {
finalPathModifications.add(modification);
}
});
}
return finalPathModifications;

COLLECTOR-SAHAB / covering test: DeletionQueryTest

{return-object}.size=0 only occurs in the original version.

});
}
/**

0 comments on commit e5e4f17

Please sign in to comment.