Github user poornachandra commented on a diff in the pull request: https://github.com/apache/incubator-tephra/pull/35#discussion_r100931390 --- Diff: tephra-hbase-compat-1.1-base/src/main/java/org/apache/tephra/hbase/coprocessor/TransactionProcessor.java --- @@ -454,28 +441,39 @@ protected Filter getTransactionFilter(Transaction tx, ScanType type, Filter filt return TransactionFilters.getVisibilityFilter(tx, ttlByFamily, allowEmptyValues, type, filter); } - private void initPruneState(ObserverContext<RegionCoprocessorEnvironment> c) { - 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 + protected void initializePruneState(RegionCoprocessorEnvironment env) { + Configuration conf = getConfiguration(env); 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); + // pruneTable and pruneFlushInterval cannot be changed by simply loading the Configuration dynamically + // since we have only one flush thread across all regions and we might loose. --- End diff -- This comment can be removed now
--- 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. ---