Skip to content

Commit 2dd4068

Browse files
baotongluBaotong LU
andauthored
correct the density in bulkload (#18)
Co-authored-by: Baotong LU <[email protected]>
1 parent 83b6506 commit 2dd4068

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/core/alex.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ class Alex {
729729
// Automatically convert to data node when it is impossible to be better
730730
// than current cost
731731
if (num_keys <= derived_params_.max_data_node_slots *
732-
data_node_type::kMinDensity_ &&
732+
data_node_type::kInitDensity_ &&
733733
(node->cost_ < kNodeLookupsWeight || node->model_.a_ == 0)) {
734734
stats_.num_data_nodes++;
735735
auto data_node = new (data_node_allocator().allocate(1))
@@ -749,7 +749,7 @@ class Alex {
749749
std::pair<int, double> best_fanout_stats;
750750
if (experimental_params_.fanout_selection_method == 0) {
751751
int max_data_node_keys = static_cast<int>(
752-
derived_params_.max_data_node_slots * data_node_type::kMinDensity_);
752+
derived_params_.max_data_node_slots * data_node_type::kInitDensity_);
753753
best_fanout_stats = fanout_tree::find_best_fanout_bottom_up<T, P>(
754754
values, num_keys, node, total_keys, used_fanout_tree_nodes,
755755
derived_params_.max_fanout, max_data_node_keys,
@@ -768,7 +768,7 @@ class Alex {
768768
// Decide whether this node should be a model node or data node
769769
if (best_fanout_tree_cost < node->cost_ ||
770770
num_keys > derived_params_.max_data_node_slots *
771-
data_node_type::kMinDensity_) {
771+
data_node_type::kInitDensity_) {
772772
// Convert to model node based on the output of the fanout tree
773773
stats_.num_model_nodes++;
774774
auto model_node = new (model_node_allocator().allocate(1))
@@ -785,7 +785,7 @@ class Alex {
785785
1;
786786
used_fanout_tree_nodes.clear();
787787
int max_data_node_keys = static_cast<int>(
788-
derived_params_.max_data_node_slots * data_node_type::kMinDensity_);
788+
derived_params_.max_data_node_slots * data_node_type::kInitDensity_);
789789
fanout_tree::compute_level<T, P>(
790790
values, num_keys, node, total_keys, used_fanout_tree_nodes,
791791
best_fanout_tree_depth, max_data_node_keys,

0 commit comments

Comments
 (0)