Github user poornachandra commented on a diff in the pull request: https://github.com/apache/incubator-tephra/pull/35#discussion_r100709097 --- Diff: tephra-hbase-compat-1.1-base/src/main/java/org/apache/tephra/hbase/coprocessor/TransactionProcessor.java --- @@ -317,31 +317,31 @@ public InternalScanner preCompactScannerOpen(ObserverContext<RegionCoprocessorEn // Get the latest tx snapshot state for the compaction TransactionVisibilityState snapshot = cache.getLatestState(); - if (pruneEnable == null) { - Configuration conf = getConfiguration(c.getEnvironment()); - // Configuration won't be null in TransactionProcessor but the derived classes might return - // null if it is not available temporarily - if (conf != null) { - pruneEnable = conf.getBoolean(TxConstants.TransactionPruning.PRUNE_ENABLE, - TxConstants.TransactionPruning.DEFAULT_PRUNE_ENABLE); - if (Boolean.TRUE.equals(pruneEnable)) { - String pruneTable = conf.get(TxConstants.TransactionPruning.PRUNE_STATE_TABLE, - TxConstants.TransactionPruning.DEFAULT_PRUNE_STATE_TABLE); - long pruneFlushInterval = TimeUnit.SECONDS.toMillis( - conf.getLong(TxConstants.TransactionPruning.PRUNE_FLUSH_INTERVAL, - TxConstants.TransactionPruning.DEFAULT_PRUNE_FLUSH_INTERVAL)); - compactionState = new CompactionState(c.getEnvironment(), TableName.valueOf(pruneTable), pruneFlushInterval); - if (LOG.isDebugEnabled()) { - LOG.debug("Automatic invalid list pruning is enabled. Compaction state will be recorded in table " - + pruneTable); - } + Configuration conf = getConfiguration(c.getEnvironment()); --- End diff -- We don't need to read the configuration every time since it does not change when part of hbase-site.xml, right? We just need to make sure that when derived classes update the pruneEnable and other fields from a different thread, it gets reflected here.
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---