Add split parameter into config
This commit is contained in:
parent
0e517bb9f8
commit
1b64a45f10
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2023 Memgraph Ltd.
|
// Copyright 2022 Memgraph Ltd.
|
||||||
//
|
//
|
||||||
// Use of this software is governed by the Business Source License
|
// Use of this software is governed by the Business Source License
|
||||||
// included in the file licenses/BSL.txt; by using this file, you agree to be bound by the terms of the Business Source
|
// included in the file licenses/BSL.txt; by using this file, you agree to be bound by the terms of the Business Source
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2023 Memgraph Ltd.
|
// Copyright 2022 Memgraph Ltd.
|
||||||
//
|
//
|
||||||
// Use of this software is governed by the Business Source License
|
// Use of this software is governed by the Business Source License
|
||||||
// included in the file licenses/BSL.txt; by using this file, you agree to be bound by the terms of the Business Source
|
// included in the file licenses/BSL.txt; by using this file, you agree to be bound by the terms of the Business Source
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2023 Memgraph Ltd.
|
// Copyright 2022 Memgraph Ltd.
|
||||||
//
|
//
|
||||||
// Use of this software is governed by the Business Source License
|
// Use of this software is governed by the Business Source License
|
||||||
// included in the file licenses/BSL.txt; by using this file, you agree to be bound by the terms of the Business Source
|
// included in the file licenses/BSL.txt; by using this file, you agree to be bound by the terms of the Business Source
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2023 Memgraph Ltd.
|
// Copyright 2022 Memgraph Ltd.
|
||||||
//
|
//
|
||||||
// Use of this software is governed by the Business Source License
|
// Use of this software is governed by the Business Source License
|
||||||
// included in the file licenses/BSL.txt; by using this file, you agree to be bound by the terms of the Business Source
|
// included in the file licenses/BSL.txt; by using this file, you agree to be bound by the terms of the Business Source
|
||||||
|
@ -30,6 +30,10 @@ struct Config {
|
|||||||
io::Duration reclamation_interval{};
|
io::Duration reclamation_interval{};
|
||||||
} gc;
|
} gc;
|
||||||
|
|
||||||
|
struct Split {
|
||||||
|
uint64_t max_shard_vertex_size{500'000};
|
||||||
|
} split;
|
||||||
|
|
||||||
struct Items {
|
struct Items {
|
||||||
bool properties_on_edges{true};
|
bool properties_on_edges{true};
|
||||||
} items;
|
} items;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2023 Memgraph Ltd.
|
// Copyright 2022 Memgraph Ltd.
|
||||||
//
|
//
|
||||||
// Use of this software is governed by the Business Source License
|
// Use of this software is governed by the Business Source License
|
||||||
// included in the file licenses/BSL.txt; by using this file, you agree to be bound by the terms of the Business Source
|
// included in the file licenses/BSL.txt; by using this file, you agree to be bound by the terms of the Business Source
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2023 Memgraph Ltd.
|
// Copyright 2022 Memgraph Ltd.
|
||||||
//
|
//
|
||||||
// Use of this software is governed by the Business Source License
|
// Use of this software is governed by the Business Source License
|
||||||
// included in the file licenses/BSL.txt; by using this file, you agree to be bound by the terms of the Business Source
|
// included in the file licenses/BSL.txt; by using this file, you agree to be bound by the terms of the Business Source
|
||||||
|
@ -1100,7 +1100,7 @@ void Shard::StoreMapping(std::unordered_map<uint64_t, std::string> id_to_name) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::optional<SplitInfo> Shard::ShouldSplit() const noexcept {
|
std::optional<SplitInfo> Shard::ShouldSplit() const noexcept {
|
||||||
if (vertices_.size() > 10000000) {
|
if (vertices_.size() > config_.split.max_shard_vertex_size) {
|
||||||
// Why should we care if the selected vertex is deleted
|
// Why should we care if the selected vertex is deleted
|
||||||
auto mid_elem = vertices_.begin();
|
auto mid_elem = vertices_.begin();
|
||||||
// mid_elem->first
|
// mid_elem->first
|
||||||
|
Loading…
Reference in New Issue
Block a user