Github user phrocker commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/60#discussion_r48753072
  
    --- Diff: 
server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Scanner.java ---
    @@ -38,100 +40,126 @@
       private ScanDataSource isolatedDataSource;
       private boolean sawException = false;
       private boolean scanClosed = false;
    +  protected Semaphore scannerSemaphore;
     
       Scanner(Tablet tablet, Range range, ScanOptions options) {
         this.tablet = tablet;
         this.range = range;
         this.options = options;
    +    scannerSemaphore = new Semaphore(1, true);
    --- End diff --
    
    My only reason for enforcing fairness was that we likely only have a single 
thread doing reads ( otherwise we'd have different sessions ); however, we will 
have another thread doing a close. I wanted to enforce order in the event that 
the read should occur first. In rethinking this I'm not terribly certain this a 
problem. 
    
    As we discussed I only used a semaphore based on the aforementioned 
assumption of a single thread doing reads within the scanner. I'm not tied to 
the idea. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to