mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-13 09:52:38 +00:00
more fixes
This commit is contained in:
parent
2e0821e739
commit
55f658ad78
@ -77,7 +77,7 @@ export function* floatLayerMerges({insertPartSize, layerBases})
|
||||
let best_layer = layerBases.length;
|
||||
const active_parts = mt.sortedActiveParts();
|
||||
let prev_part = null;
|
||||
for (let begin = 0; begin < active_parts.length - 2; begin++)
|
||||
for (let begin = 0; begin <= active_parts.length - 2; begin++)
|
||||
{
|
||||
const begin_part = active_parts[begin];
|
||||
if (begin_part.merging)
|
||||
|
@ -1,6 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Merge Selector Lab</title>
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
|
||||
<script src="https://d3js.org/d3.v7.min.js"></script>
|
||||
|
@ -1,6 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Merge Selector Lab</title>
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
|
||||
<script src="https://d3js.org/d3.v7.min.js"></script>
|
||||
|
@ -1,4 +1,4 @@
|
||||
function layerFuncForBases(insertPartSize, layerBases)
|
||||
function layerFuncForIntegerBases(insertPartSize, layerBases)
|
||||
{
|
||||
let sizes = [insertPartSize];
|
||||
for (const base of layerBases)
|
||||
@ -37,7 +37,7 @@ function layerFuncForBases(insertPartSize, layerBases)
|
||||
// Lower layers get absolute priority over higher layers.
|
||||
export function* integerLayerMerges({insertPartSize, layerBases})
|
||||
{
|
||||
const layerFunc = layerFuncForBases(insertPartSize, layerBases);
|
||||
const layerFunc = layerFuncForIntegerBases(insertPartSize, layerBases);
|
||||
const mt = yield {type: 'getMergeTree'};
|
||||
|
||||
const settings = {
|
||||
@ -53,11 +53,13 @@ export function* integerLayerMerges({insertPartSize, layerBases})
|
||||
let best_layer = Infinity;
|
||||
for (const cur_range of mt.getRangesForMerge())
|
||||
{
|
||||
for (let begin = 0; begin < cur_range.length - settings.min_parts; begin++)
|
||||
for (let begin = 0; begin <= cur_range.length - settings.min_parts; begin++)
|
||||
{
|
||||
const layer = layerFunc(cur_range[begin].bytes);
|
||||
if (layer >= best_layer)
|
||||
continue; // We already have parts to merge on this layer
|
||||
if (layer >= layerBases.length)
|
||||
continue; // Merging futher not requested
|
||||
const base = layerBases[layer];
|
||||
const end = begin + base;
|
||||
if (end > cur_range.length)
|
||||
|
Loading…
Reference in New Issue
Block a user