提交 592aca2e authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Use ceilingKey() in MVSecondaryIndex.requireUnique()

上级 b73fb0a3
...@@ -228,9 +228,9 @@ public final class MVSecondaryIndex extends BaseIndex implements MVIndex { ...@@ -228,9 +228,9 @@ public final class MVSecondaryIndex extends BaseIndex implements MVIndex {
} }
private void requireUnique(SearchRow row, TransactionMap<Value, Value> map, ValueArray unique) { private void requireUnique(SearchRow row, TransactionMap<Value, Value> map, ValueArray unique) {
Iterator<Value> it = map.keyIterator(unique); Value key = map.ceilingKey(unique);
if (it.hasNext()) { if (key != null) {
ValueArray k = (ValueArray) it.next(); ValueArray k = (ValueArray) key;
if (compareRows(row, convertToSearchRow(k)) == 0) { if (compareRows(row, convertToSearchRow(k)) == 0) {
// committed // committed
throw getDuplicateKeyException(k.toString()); throw getDuplicateKeyException(k.toString());
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论