SteveYurongSu commented on code in PR #15049:
URL: https://github.com/apache/iotdb/pull/15049#discussion_r1986755993
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/load/memory/LoadTsFileMemoryManager.java:
##########
@@ -88,17 +88,24 @@ public synchronized void releaseToQuery(long sizeInBytes) {
sizeInBytes,
usedMemorySizeInBytes.get());
}
- usedMemorySizeInBytes.addAndGet(-sizeInBytes);
- QUERY_ENGINE_MEMORY_MANAGER.releaseToFreeMemoryForOperators(sizeInBytes);
+ final long sizeToRelease = Math.min(sizeInBytes,
usedMemorySizeInBytes.get());
+ usedMemorySizeInBytes.addAndGet(-sizeToRelease);
+ QUERY_ENGINE_MEMORY_MANAGER.releaseToFreeMemoryForOperators(sizeToRelease);
this.notifyAll();
}
public synchronized LoadTsFileAnalyzeSchemaMemoryBlock
allocateAnalyzeSchemaMemoryBlock(
long sizeInBytes) throws LoadRuntimeOutOfMemoryException {
try {
forceAllocateFromQuery(sizeInBytes);
+ LOGGER.info(
+ "Load: Allocated AnalyzeSchemaMemoryBlock from query engine, size:
{}", sizeInBytes);
Review Comment:
is debug enabled -> log.debug
--
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]