cshannon opened a new issue, #5004:
URL: https://github.com/apache/accumulo/issues/5004

   While debugging an unrelated issue I noticed the following in the logs:
   
   ```
   2024-10-20T15:18:17,440 82 [manager.Manager] ERROR: Error processing table 
state for store Normal Tablets
   java.util.NoSuchElementException: null
           at java.base/java.util.TreeMap.key(TreeMap.java:1602) ~[?:?]
           at java.base/java.util.TreeMap.lastKey(TreeMap.java:298) ~[?:?]
           at 
org.apache.accumulo.manager.compaction.queue.CompactionJobPriorityQueue.addJobToQueue(CompactionJobPriorityQueue.java:334)
 ~[classes/:?]
           at 
org.apache.accumulo.manager.compaction.queue.CompactionJobPriorityQueue.add(CompactionJobPriorityQueue.java:211)
 ~[classes/:?]
           at 
org.apache.accumulo.manager.compaction.queue.CompactionJobQueues.add(CompactionJobQueues.java:191)
 ~[classes/:?]
           at 
org.apache.accumulo.manager.compaction.queue.CompactionJobQueues.add(CompactionJobQueues.java:87)
 ~[classes/:?]
           at 
org.apache.accumulo.manager.compaction.coordinator.CompactionCoordinator.addJobs(CompactionCoordinator.java:680)
 ~[classes/:?]
           at 
org.apache.accumulo.manager.TabletGroupWatcher.manageTablets(TabletGroupWatcher.java:609)
 ~[classes/:?]
           at 
org.apache.accumulo.manager.TabletGroupWatcher.run(TabletGroupWatcher.java:747) 
[classes/:?]
   ```
   
   That call to lastKey() is executed when the size is >= to the max size of 
the queue. I talked to @keith-turner and we should not allow setting that size 
to 0 which can happen 
[here](https://github.com/apache/accumulo/blob/ab5c57eb3c25d202133fa8e1e818115e7855accc/server/manager/src/main/java/org/apache/accumulo/manager/compaction/coordinator/CompactionCoordinator.java#L1068).
  We should probably change that to have a minimum size of 1, ie 
`(aliveCompactorsForGroup + 1) * queueSizeFactor`.  
   
   Any other place that the queue is set, such as 
[this](https://github.com/apache/accumulo/blob/ab5c57eb3c25d202133fa8e1e818115e7855accc/server/manager/src/main/java/org/apache/accumulo/manager/compaction/coordinator/CompactionCoordinator.java#L1053)
 spot in the same method, should also be checked to make sure it is not 0 and 
it would probably be good to add a precondition check in the setter to make 
sure the size argument >= 1.
   
   Lastly we should check any unit tests are not broken or are fixed if the min 
size used to be 0 and is now 1.
   


-- 
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