ctubbsii commented on code in PR #5553:
URL: https://github.com/apache/accumulo/pull/5553#discussion_r2096327399
##########
server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java:
##########
@@ -606,7 +601,11 @@ public void seek(Range range, Collection<ByteSequence>
columnFamilies, boolean i
throw new IterationInterruptedException();
}
- iter.delete();
+ if (iter != null) {
+ iter.delete();
+ } else {
+ Preconditions.checkState(!seeked);
+ }
Review Comment:
I would definitely reverse this negation:
```suggestion
if (iter == null) {
Preconditions.checkState(!seeked); // iter is null only if never
seeked
} else {
iter.delete();
}
```
--
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]