|
|
|
@ -54,6 +54,7 @@ import org.rocksdb.LRUCache; |
|
|
|
|
import org.rocksdb.RocksDBException; |
|
|
|
|
import org.rocksdb.RocksIterator; |
|
|
|
|
import org.rocksdb.Statistics; |
|
|
|
|
import org.rocksdb.Status; |
|
|
|
|
import org.rocksdb.TransactionDB; |
|
|
|
|
import org.rocksdb.TransactionDBOptions; |
|
|
|
|
import org.rocksdb.WriteOptions; |
|
|
|
@ -172,11 +173,13 @@ public class RocksDBColumnarKeyValueStorage |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void delete(final ColumnFamilyHandle segmentHandle, final byte[] key) { |
|
|
|
|
public boolean tryDelete(final ColumnFamilyHandle segmentHandle, final byte[] key) { |
|
|
|
|
try { |
|
|
|
|
db.delete(segmentHandle, key); |
|
|
|
|
} catch (RocksDBException e) { |
|
|
|
|
throw new StorageException(e); |
|
|
|
|
return true; |
|
|
|
|
} catch (final RocksDBException rdbe) { |
|
|
|
|
if (rdbe.getStatus().getCode() == Status.Code.TimedOut) return false; |
|
|
|
|
throw new StorageException(rdbe); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|