ibessonov commented on code in PR #1031:
URL: https://github.com/apache/ignite-3/pull/1031#discussion_r952632725


##########
modules/storage-rocksdb/src/main/java/org/apache/ignite/internal/storage/rocksdb/index/RocksDbHashIndexStorage.java:
##########
@@ -145,20 +161,46 @@ public void remove(IndexRow row) {
         }
     }
 
+    @Override
+    public void destroy() {
+        byte[] rangeEnd = rangeEnd(constantPrefix);
+
+        try (WriteOptions writeOptions = new 
WriteOptions().setDisableWAL(true)) {
+            // If we can't construct the range end prefix (nearly impossible 
case), we need to fallback to manually removing the data,
+            // since 'deleteRange' doesn't work without the upper bound.
+            if (rangeEnd == null) {

Review Comment:
   I'd rather have an assertion that this is impossible. Partition id stops way 
before 0xffff.
   By the way, have you updated the list of column families in 
`RocksDbTableStorage#scheduleFlush`? It's easy to miss, because I didn't 
document it :(



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to