You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2022/11/02 05:09:28 UTC

[GitHub] [accumulo] ctubbsii commented on a diff in pull request #3063: test improvements from PR #1333 and check-style clean up

ctubbsii commented on code in PR #3063:
URL: https://github.com/apache/accumulo/pull/3063#discussion_r1011199631


##########
core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/lru/CachedBlockQueue.java:
##########
@@ -73,7 +73,7 @@ public void add(CachedBlock cb) {
       heapSize += cb.heapSize();
     } else {
       CachedBlock head = queue.peek();
-      if (cb.compareTo(head) > 0) {
+      if (head != null && cb.compareTo(head) > 0) {

Review Comment:
   I'm not sure about this change. If the queue is empty (peek returns null), then this cb is never queued. I'm not sure if this situation is ever possible, unless `maxSize < 0`, though.
   
   Ultimately, I don't see the motivate for changing this behavior.



-- 
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: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org