OPENDJ-2391 The backendtool dump-storage-tree (dump-tree) option -K | --maxKeyValue is ignored.
Stop key is considered only as exact match. Try looking for the key or next instead, if it exists.
| | |
| | | ByteString key; |
| | | ByteString maxKey = null; |
| | | ByteString value; |
| | | boolean maxKeyReached; |
| | | |
| | | if (options.get(DUMP_MIN_KEY_VALUE).isPresent()) |
| | | { |
| | |
| | | do |
| | | { |
| | | key = cursor.getKey(); |
| | | maxKeyReached = key.equals(maxKey); |
| | | if (maxKey != null && key.compareTo(maxKey) > 0) |
| | | { |
| | | break; |
| | | } |
| | | value = cursor.getValue(); |
| | | long valueLen = value.length(); |
| | | if (options.get(DUMP_MIN_DATA_SIZE) <= valueLen && valueLen <= options.get(DUMP_MAX_DATA_SIZE)) |
| | |
| | | } |
| | | } |
| | | } |
| | | while (cursor.next() && !maxKeyReached); |
| | | while (cursor.next()); |
| | | } |
| | | catch (Exception e) |
| | | { |