diff options
| author | Douglas Rumbaugh <dbr4@psu.edu> | 2025-02-06 15:56:33 -0500 |
|---|---|---|
| committer | Douglas Rumbaugh <dbr4@psu.edu> | 2025-02-06 15:56:33 -0500 |
| commit | fd0e99e618319974320ed3fb49535aec501be1fb (patch) | |
| tree | ba5015299ec58beeea152b46eff15a4778b4f20f /include/framework/reconstruction/TieringPolicy.h | |
| parent | 5ee10c336581b68ba91c7048431809e3ccaf7e87 (diff) | |
| download | dynamic-extension-fd0e99e618319974320ed3fb49535aec501be1fb.tar.gz | |
Background compaction stuff
Diffstat (limited to 'include/framework/reconstruction/TieringPolicy.h')
| -rw-r--r-- | include/framework/reconstruction/TieringPolicy.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/include/framework/reconstruction/TieringPolicy.h b/include/framework/reconstruction/TieringPolicy.h index dce5c3c..ae215db 100644 --- a/include/framework/reconstruction/TieringPolicy.h +++ b/include/framework/reconstruction/TieringPolicy.h @@ -17,14 +17,15 @@ namespace de { template <ShardInterface ShardType, QueryInterface<ShardType> QueryType> class TieringPolicy : public ReconstructionPolicy<ShardType, QueryType> { - typedef std::vector<std::shared_ptr<InternalLevel<ShardType, QueryType>>> LevelVector; + typedef std::vector<std::shared_ptr<InternalLevel<ShardType, QueryType>>> + LevelVector; + public: TieringPolicy(size_t scale_factor, size_t buffer_size) : m_scale_factor(scale_factor), m_buffer_size(buffer_size) {} - ReconstructionVector - get_reconstruction_tasks(const Version<ShardType, QueryType> *version, - size_t incoming_reccnt) const override { + ReconstructionVector get_reconstruction_tasks( + const Version<ShardType, QueryType> *version) const override { ReconstructionVector reconstructions; return reconstructions; } @@ -59,7 +60,7 @@ private: level_index find_reconstruction_target(LevelVector &levels) const { level_index target_level = invalid_level_idx; - for (level_index i = 0; i < (level_index) levels.size(); i++) { + for (level_index i = 0; i < (level_index)levels.size(); i++) { if (levels[i]->get_shard_count() + 1 <= capacity()) { target_level = i; break; @@ -69,9 +70,7 @@ private: return target_level; } - inline size_t capacity() const { - return m_scale_factor; - } + inline size_t capacity() const { return m_scale_factor; } size_t m_scale_factor; size_t m_buffer_size; |