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

    https://github.com/apache/incubator-tephra/pull/35#discussion_r100940812
  
    --- Diff: 
tephra-hbase-compat-1.1-base/src/main/java/org/apache/tephra/hbase/txprune/PruneUpperBoundWriter.java
 ---
    @@ -97,27 +101,33 @@ private void startFlushThread() {
         flushThread = new Thread("tephra-prune-upper-bound-writer") {
           @Override
           public void run() {
    -        while ((!isInterrupted()) && isRunning()) {
    +        while ((!isInterrupted()) && (!stopped)) {
               long now = System.currentTimeMillis();
               if (now > (lastChecked + pruneFlushInterval)) {
                 // should flush data
                 try {
    -              // Record prune upper bound
    -              while (!pruneEntries.isEmpty()) {
    -                Map.Entry<byte[], Long> firstEntry = 
pruneEntries.firstEntry();
    -                
dataJanitorState.savePruneUpperBoundForRegion(firstEntry.getKey(), 
firstEntry.getValue());
    -                // We can now remove the entry only if the key and value 
match with what we wrote since it is
    -                // possible that a new pruneUpperBound for the same key 
has been added
    -                pruneEntries.remove(firstEntry.getKey(), 
firstEntry.getValue());
    -              }
    -              // Record empty regions
    -              while (!emptyRegions.isEmpty()) {
    -                Map.Entry<byte[], Long> firstEntry = 
emptyRegions.firstEntry();
    -                
dataJanitorState.saveEmptyRegionForTime(firstEntry.getValue(), 
firstEntry.getKey());
    -                // We can now remove the entry only if the key and value 
match with what we wrote since it is
    -                // possible that a new value for the same key has been 
added
    -                emptyRegions.remove(firstEntry.getKey(), 
firstEntry.getValue());
    -              }
    +              User.runAsLoginUser(new PrivilegedExceptionAction<Void>() {
    --- End diff --
    
    Let's not close TEPHRA-219 until we have figured out how to handle the 
wrapping cleanly.


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