You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "keith-turner (via GitHub)" <gi...@apache.org> on 2024/06/01 17:46:30 UTC

Re: [PR] Interrupt internal compaction thread if no longer enabled [accumulo]

keith-turner commented on code in PR #4623:
URL: https://github.com/apache/accumulo/pull/4623#discussion_r1623256999


##########
core/src/main/java/org/apache/accumulo/core/iteratorsImpl/system/HeapIterator.java:
##########
@@ -72,6 +73,10 @@ public final void next() throws IOException {
       throw new IllegalStateException("Called next() when there is no top");
     }
 
+    if (Thread.currentThread().isInterrupted()) {

Review Comment:
   Not sure the compaction code has an AtomicBoolean readily available to pass to the iterator code.  We could possibly change InterruptibleIterator, which is not public API, to accept a more generic type than AtomicBoolean that could work better for the compaction code.  Maybe something like following.
   
   ```
   package org.apache.accumulo.core.iteratorsImpl.system
   public interface InterruptibleIterator extends SortedKeyValueIterator<Key,Value> {
     void setInterruptFlag(BooleanSupplier flag);
   }
   ```



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