summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDouglas B. Rumbaugh <doug@douglasrumbaugh.com>2024-12-22 15:48:55 -0500
committerDouglas B. Rumbaugh <doug@douglasrumbaugh.com>2024-12-22 15:48:55 -0500
commit2724b98da8699af150e850e66e92e0a832cd2e29 (patch)
treecd32559b5065bf5447b0bd3c18495fb9e3606ea8
parentba65c8976f54d4da2467074235a12f5be0bd5ebc (diff)
downloaddynamic-extension-2724b98da8699af150e850e66e92e0a832cd2e29.tar.gz
More updates
BSM is currently broken--I'll need to think a bit about how best to actually implement this in the current framework (if I even want to port it over) because it doesn't use the same flushing mechanism as most other approaches.
-rw-r--r--include/framework/reconstruction/BSMPolicy.h6
-rw-r--r--include/framework/reconstruction/LevelingPolicy.h2
-rw-r--r--include/framework/reconstruction/TieringPolicy.h4
3 files changed, 6 insertions, 6 deletions
diff --git a/include/framework/reconstruction/BSMPolicy.h b/include/framework/reconstruction/BSMPolicy.h
index 4ceca9a..ab8c6e4 100644
--- a/include/framework/reconstruction/BSMPolicy.h
+++ b/include/framework/reconstruction/BSMPolicy.h
@@ -56,15 +56,15 @@ public:
ReconstructionTask
get_flush_task(const Epoch<ShardType, QueryType> *epoch) const override {
return ReconstructionTask{
- {{buffer_shid}}, 0, m_buffer_size, ReconstructionType::Flush};
+ {{buffer_shid}}, 0, m_buffer_size, ReconstructionType::Merge};
}
private:
level_index find_reconstruction_target(LevelVector &levels) const {
- level_index target_level = 0;
+ level_index target_level = invalid_level_idx;
for (level_index i = 0; i < (level_index)levels.size(); i++) {
- if (levels[i]->get_record_count() + 1 <= capacity(i)) {
+ if (levels[i]->get_record_count() + m_buffer_size <= capacity(i)) {
target_level = i;
break;
}
diff --git a/include/framework/reconstruction/LevelingPolicy.h b/include/framework/reconstruction/LevelingPolicy.h
index 8bf5645..add28ba 100644
--- a/include/framework/reconstruction/LevelingPolicy.h
+++ b/include/framework/reconstruction/LevelingPolicy.h
@@ -59,7 +59,7 @@ public:
private:
level_index find_reconstruction_target(LevelVector &levels) const {
- level_index target_level = 0;
+ level_index target_level = invalid_level_idx;
size_t incoming_records = m_buffer_size;
for (level_index i = 0; i < (level_index)levels.size(); i++) {
diff --git a/include/framework/reconstruction/TieringPolicy.h b/include/framework/reconstruction/TieringPolicy.h
index 71fe9ec..1443309 100644
--- a/include/framework/reconstruction/TieringPolicy.h
+++ b/include/framework/reconstruction/TieringPolicy.h
@@ -52,12 +52,12 @@ public:
ReconstructionTask
get_flush_task(const Epoch<ShardType, QueryType> *epoch) const override {
return ReconstructionTask{
- {{buffer_shid}}, 0, m_buffer_size, ReconstructionType::Flush};
+ {{buffer_shid}}, 0, m_buffer_size, ReconstructionType::Append};
}
private:
level_index find_reconstruction_target(LevelVector &levels) const {
- level_index target_level = 0;
+ level_index target_level = invalid_level_idx;
for (level_index i = 0; i < (level_index) levels.size(); i++) {
if (levels[i]->get_shard_count() + 1 <= capacity()) {