File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -978,10 +978,11 @@ bool Cluster::Split(TxGraphImpl& graph) noexcept
978
978
// Iterate over the connected components of this Cluster's m_depgraph.
979
979
while (todo.Any ()) {
980
980
auto component = m_depgraph.FindConnectedComponent (todo);
981
+ auto split_quality = component.Count () <= 2 ? QualityLevel::OPTIMAL : new_quality;
981
982
if (first && component == todo) {
982
983
// The existing Cluster is an entire component. Leave it be, but update its quality.
983
984
Assume (todo == m_depgraph.Positions ());
984
- graph.SetClusterQuality (m_level, m_quality, m_setindex, new_quality );
985
+ graph.SetClusterQuality (m_level, m_quality, m_setindex, split_quality );
985
986
// If this made the quality ACCEPTABLE or OPTIMAL, we need to compute and cache its
986
987
// chunking.
987
988
Updated (graph);
@@ -996,7 +997,7 @@ bool Cluster::Split(TxGraphImpl& graph) noexcept
996
997
for (auto i : component) {
997
998
remap[i] = {new_cluster.get (), DepGraphIndex (-1 )};
998
999
}
999
- graph.InsertCluster (m_level, std::move (new_cluster), new_quality );
1000
+ graph.InsertCluster (m_level, std::move (new_cluster), split_quality );
1000
1001
todo -= component;
1001
1002
}
1002
1003
// Redistribute the transactions.
You can’t perform that action at this time.
0 commit comments