Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ public void insert(InsertRowPlan insertRowPlan) {
updatePlanIndexes(insertRowPlan.getIndex());
for (int i = 0; i < insertRowPlan.getValues().length; i++) {

if (insertRowPlan.getValues()[i] == null) {
Object value = insertRowPlan.getValues()[i];
if (value == null) {
continue;
}

Object value = insertRowPlan.getValues()[i];
memSize += MemUtils
.getRecordSize(insertRowPlan.getMeasurementMNodes()[i].getSchema().getType(), value,
disableMemControl);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,8 @@ private TsFileProcessor getOrCreateTsFileProcessorIntern(long timeRangeId,
// we have to ensure only one thread can change workSequenceTsFileProcessors
writeLock();
try {
if (!tsFileProcessorTreeMap.containsKey(timeRangeId)) {
res = tsFileProcessorTreeMap.get(timeRangeId);
if (res == null) {
// we have to remove oldest processor to control the num of the memtables
// TODO: use a method to control the number of memtables
if (tsFileProcessorTreeMap.size()
Expand All @@ -992,8 +993,6 @@ private TsFileProcessor getOrCreateTsFileProcessorIntern(long timeRangeId,
tsFileProcessorTreeMap.put(timeRangeId, newProcessor);
tsFileManagement.add(newProcessor.getTsFileResource(), sequence);
res = newProcessor;
} else {
res = tsFileProcessorTreeMap.get(timeRangeId);
}

} finally {
Expand Down