4paradigm / 4paradigm/OpenMLDB
Optimize concurrent access for aggregators
- 主要言語
- C++
- スター
- 1.7k
- フォーク
- 331
- 平均マージ
- 12日 12時間
- マージ済み PR(30日)
- 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
コントリビューションガイド
調査の方向性
aggregator は src/storage/aggregator.h で定義され、Put リクエスト中に使用されます。現在の mutex の使用方法と、同時アクセスのパターンを調査してください。サードパーティ製の concurrent hashmap ライブラリ、または C++ に適した atomic operation を調査してください。成功する変更では、スレッドセーフ性を維持しながらメモリオーバーヘッドを削減する必要があり、おそらくベンチマークが必要になります。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- cpp
- 領域
- backend, databases, performance
- issue の種類
- リファクタリング
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 25/100