4paradigm / 4paradigm/OpenMLDB
Optimize concurrent access for aggregators
- 主要语言
- C++
- 星标
- 1.7k
- 派生
- 331
- 平均合并
- 12 天 12 小时
- 30 天内合并 PR
- 1
描述
**Describe the feature you'd like**
The aggregators may be accessed concurrently. Now each of the aggregators is protected by its mutex. It is costly in terms of memory usage.
We should design a more efficient thread-safe method to access the aggregators.
Some possible directions:
1. introduce the implementation of concurrent hashmap from third-party libraries.
2. asynchronous update for the aggregators
3. introduce some `atomic` way to eliminate the `lock`
**Additional context**
pre-aggregators update during `Put` request
src/storage/aggregator.h
贡献指南
调研方向
聚合器定义在 src/storage/aggregator.h 中,并在 Put 请求期间使用。检查当前的互斥锁使用情况和并发访问模式。研究适用于 C++ 的第三方并发哈希表库或原子操作。成功的更改将在保持线程安全的同时减少内存开销,并且可能需要进行基准测试。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- cpp
- 领域
- backend, databases, performance
- Issue 类型
- 重构
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100