keith-turner commented on issue #3512:
URL: https://github.com/apache/accumulo/issues/3512#issuecomment-1611811671

   I may have been able to reproduce this. I was running the following in 
jshell because I suspected an issue with isolated scans.  I currently have a 
tablet stuck in close waiting to scan. I am investigating the stuck tablet.
   
   ```java
           client.tableOperations().create("foo");
   
           try(var writer = client.createBatchWriter("foo")) {
               for(int i = 0; i < 1000000; i++) {
                   Mutation m = new Mutation(String.format("%08d", i));
                   m.put("","","");
                   writer.addMutation(m);
               }
           }
   
           client.tableOperations().flush("foo",null,null,true);
   
           Runnable task = new Runnable() {
               @Override
               public void run() {
                   while(true) {
                       try (var scanner = new 
IsolatedScanner(client.createScanner("foo"))) {
                           // TODO maybe do not close scanner?  The following 
limit was placed on the stream to 
                           //  avoid reading all the data possibly leaving a 
scan session active on the tserver
                           System.out.println(new Date()+" 
"+scanner.stream().limit(500000).count());
                       } catch (Exception e) {
                           e.printStackTrace();
                           break;
                       }
                   }
               }
           };
   
           ExecutorService service = Executors.newFixedThreadPool(10);
           for(int i =0; i< 10; i++){
             service.execute(task);
           };
   
           // do periodic splits to force tablet to close.. TODO eventually 
splitting tablet we are not scanning above
           for(int i = 0; i < 1000000; i+=1000) {
               String split = String.format("%08d", i);
               client.tableOperations().addSplits("foo", new 
TreeSet<>(List.of(new Text(split))));
               System.out.println(new Date()+" added split "+split);
               Thread.sleep(500);
           }
   ```


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