MiniSho opened a new pull request, #11756: URL: https://github.com/apache/iotdb/pull/11756
## Description Memory Manager core class `LoadTsFileMemoryManager` , which provides four interfaces: `allocatedFromQuery` and `releaseToQuery` for query module and `forceAllocate` and `tryAllocate` for load module. Analyzer part of the memory manager class `DeviceToTimeseriesSchemasMap`, which encapsulates `Map<String, Set<MeasurementSchema>> currentBatchDevice2TimeseriesSchemas` , providing add(), isEmpty(), and isEmpty(). add(), isEmpty(), clear() and other interfaces for TsFileAnalyzer to call, mainly in the add method to add the calculation of the memory process. MemoryBlock is the block of memory that the caller gets after requesting memory, which contains the size of the requested memory and the variables that mark whether the memory has been freed or not, etc. `QueryMemoryBlock` is the block of memory that the caller gets after requesting memory from the query module, and `LoadMemoryBlock` is the block of memory that the caller provides to the load module, and the requested memory will be used to calculate the size of the memory. `QueryMemoryBlock` is a block of memory requested from the query module and `LoadMemoryBlock` is a block of memory provided to the load module, and the requested QueryMemoryBlock is stuffed into the corresponding LoadMemoryBlock and returned to load. ---------- 内存控制核心类 LoadTsFileMemoryManager, 向上(查询模块)提供allocatedFromQuery 和 releaseFromQuery 两个接口,向下(load模块)提供forceAllocate和tryAllocate两个接口 analyzer部分内存控制类 DeviceToTimeseriesSchemasMap, 其中封装了Map<String, Set<MeasurementSchema>> currentBatchDevice2TimeseriesSchemas ,向外提供 add(),isEmpty(),clear()等接口供TsFileAnalyzer调用,主要在add方法中添加计算内存流程 memoryBlock 是调用者申请内存后得到的内存块,其中包含申请到的内存大小,以及标记是否已释放的变量等。QueryMemoryBlock是向查询模块申请得到的内存块,LoadMemoryBlock是向 load 模块提供的内存块,申请到的 QueryMemoryBlock 会塞到相应的LoadMemoryBlock返回给load,其目的是当load模块用完内存块需要释放时,查询模块相应的内存也需要被释放。 -- 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]
