提交 cff8f1d6 编写于 作者: Q qiaojialin

change vm mergeTimes to flushTimes

上级 c493621b
......@@ -183,12 +183,6 @@ memtable_size_threshold=1073741824
avg_series_point_number_threshold=100000
# When merge point number reaches this, merge the vmfile to the tsfile.
merge_chunk_point_number=10000
# When vmfiles merge times exceeds this, merge the vmfile to the tsfile.
max_merge_chunk_num_in_tsfile=5
# How many threads can concurrently flush. When <= 0, use CPU core number.
concurrent_flush_thread=0
......@@ -264,6 +258,12 @@ enable_vm=true
# The max vm num of each memtable. When vm num exceeds this, the vm files will merge to one.
max_vm_num=5
# When merge point number reaches this, merge the vmfile to the tsfile.
merge_chunk_point_number=10000
# When vmfiles merge times exceeds this, merge the vmfile to the tsfile.
max_merge_chunk_num_in_tsfile=9
# How many thread will be set up to perform merge main tasks, 1 by default.
# Set to 1 when less than or equal to 0.
merge_thread_num=1
......
......@@ -125,7 +125,7 @@ public class TsFileProcessor {
private boolean sequence;
private long totalMemTableSize;
private int mergeTimes = 0;
private int flushVmTimes = 0;
private static final String FLUSH_QUERY_WRITE_LOCKED = "{}: {} get flushQueryLock write lock";
private static final String FLUSH_QUERY_WRITE_RELEASE = "{}: {} get flushQueryLock write lock released";
......@@ -661,6 +661,7 @@ public class TsFileProcessor {
}
// signal memtable only may appear when calling asyncClose()
if (!memTableToFlush.isSignalMemTable()) {
flushVmTimes++;
try {
boolean isVm = false;
boolean isFull = false;
......@@ -700,10 +701,10 @@ public class TsFileProcessor {
}
if ((vmPointNum + memTableToFlush.getTotalPointsNum()) / pathMeasurementSchemaMap.size()
> config.getMergeChunkPointNumberThreshold()
|| mergeTimes >= config.getMaxMergeChunkNumInTsFile()) {
|| flushVmTimes >= config.getMaxMergeChunkNumInTsFile()) {
isVm = false;
isFull = false;
mergeTimes = 0;
flushVmTimes = 0;
flushTask = new MemTableFlushTask(memTableToFlush, writer, vmTsFileResources, vmWriters,
false, false,
sequence,
......@@ -717,7 +718,6 @@ public class TsFileProcessor {
vmWriters, true, true,
sequence,
storageGroupName);
mergeTimes++;
} else {
isVm = true;
isFull = false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册