[
https://issues.apache.org/jira/browse/TEPHRA-215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15856388#comment-15856388
]
ASF GitHub Bot commented on TEPHRA-215:
---------------------------------------
Github user poornachandra commented on a diff in the pull request:
https://github.com/apache/incubator-tephra/pull/32#discussion_r99881005
--- Diff:
tephra-hbase-compat-1.1-base/src/main/java/org/apache/tephra/hbase/txprune/PruneUpperBoundWriter.java
---
@@ -79,15 +72,17 @@ public void run() {
while (!isInterrupted()) {
long now = System.currentTimeMillis();
if (now > (lastChecked + pruneFlushInterval)) {
- if (shouldFlush.compareAndSet(true, false)) {
+ if (!pruneEntries.isEmpty()) {
// should flush data
try {
- dataJanitorState.savePruneUpperBoundForRegion(regionName,
pruneUpperBound.get());
+ Iterator<PruneInfo> iterator = pruneEntries.iterator();
--- End diff --
Since we are doing concurrent operations here it would be good to use
`peek()` and `poll()`, rather than a iterator.
> Share PruneUpperBoundWriter across all TransactionProcessors on the same
> region server
> --------------------------------------------------------------------------------------
>
> Key: TEPHRA-215
> URL: https://issues.apache.org/jira/browse/TEPHRA-215
> Project: Tephra
> Issue Type: Improvement
> Affects Versions: 0.11.0-incubating
> Reporter: Gokul Gunasekaran
> Assignee: Gokul Gunasekaran
> Fix For: 0.11.0-incubating
>
>
> Currently we start one prune upperbound writer thread per
> TransactionProcessor coprocessor. Instead we should be able to share only one
> thread that flushes writes to the prune state table periodically.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)