提交 dc6f6f5f authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Do not copy bufferNames in MVSecondaryIndex.addBufferedRows()

上级 c853fb82
...@@ -121,7 +121,6 @@ public final class MVSecondaryIndex extends BaseIndex implements MVIndex { ...@@ -121,7 +121,6 @@ public final class MVSecondaryIndex extends BaseIndex implements MVIndex {
@Override @Override
public void addBufferedRows(List<String> bufferNames) { public void addBufferedRows(List<String> bufferNames) {
ArrayList<String> mapNames = new ArrayList<>(bufferNames);
CompareMode compareMode = database.getCompareMode(); CompareMode compareMode = database.getCompareMode();
int buffersCount = bufferNames.size(); int buffersCount = bufferNames.size();
Queue<Source> queue = new PriorityQueue<>(buffersCount, new Source.Comparator(compareMode)); Queue<Source> queue = new PriorityQueue<>(buffersCount, new Source.Comparator(compareMode));
...@@ -156,7 +155,7 @@ public final class MVSecondaryIndex extends BaseIndex implements MVIndex { ...@@ -156,7 +155,7 @@ public final class MVSecondaryIndex extends BaseIndex implements MVIndex {
} }
} }
} finally { } finally {
for (String tempMapName : mapNames) { for (String tempMapName : bufferNames) {
MVMap<ValueArray, Value> map = openMap(tempMapName); MVMap<ValueArray, Value> map = openMap(tempMapName);
map.getStore().removeMap(map); map.getStore().removeMap(map);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论