Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load: 内存控制 ver0.1 #3

Closed
wants to merge 2 commits into from
Closed

Conversation

MiniSho
Copy link

@MiniSho MiniSho commented Dec 19, 2023

Description

内存控制核心类 LoadTsFileMemoryManager, 向上(查询模块)提供allocatedFromQueryreleaseFromQuery 两个接口,向下(load模块)提供forceAllocatetryAllocate两个接口

analyzer部分内存控制类 DeviceToTimeseriesSchemasMap, 其中封装了Map<String, Set<MeasurementSchema>> currentBatchDevice2TimeseriesSchemas ,向外提供 add(),isEmpty(),clear()等接口供TsFileAnalyzer调用,主要在add方法中添加计算内存流程

memoryBlock 是调用者申请内存后得到的内存块,其中包含申请到的内存大小,以及标记是否已释放的变量等。QueryMemoryBlock是向查询模块申请得到的内存块,LoadMemoryBlock是向 load 模块提供的内存块,申请到的 QueryMemoryBlock 会塞到相应的LoadMemoryBlock返回给load,其目的是当load模块用完内存块需要释放时,查询模块相应的内存也需要被释放。

未完成部分:
LoadTsFileSchedulerCacheMemoryManager

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, this is your first pull request in IoTDB project. Thanks for your contribution! IoTDB will be better because of you.

@MiniSho MiniSho closed this Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant