[GitHub] incubator-tephra pull request #38: TEPHRA-224 Handle delay between transacti...

2017-02-22 Thread poornachandra
Github user poornachandra closed the pull request at:

https://github.com/apache/incubator-tephra/pull/38


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


[GitHub] incubator-tephra pull request #38: TEPHRA-224 Handle delay between transacti...

2017-02-22 Thread poornachandra
Github user poornachandra commented on a diff in the pull request:

https://github.com/apache/incubator-tephra/pull/38#discussion_r102559503
  
--- Diff: 
tephra-core/src/main/java/org/apache/tephra/txprune/TransactionPruningRunnable.java
 ---
@@ -57,8 +60,13 @@ public void run() {
   Transaction tx = txManager.startShort();
   txManager.abort(tx);
 
+  if (tx.getInvalids().length == 0) {
+LOG.info("Invalid list is empty, not running transaction pruning");
--- End diff --

I have filed TEPHRA-225 for to handle this


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


[GitHub] incubator-tephra pull request #38: TEPHRA-224 Handle delay between transacti...

2017-02-21 Thread anew
Github user anew commented on a diff in the pull request:

https://github.com/apache/incubator-tephra/pull/38#discussion_r102371828
  
--- Diff: 
tephra-core/src/main/java/org/apache/tephra/txprune/TransactionPruningRunnable.java
 ---
@@ -57,8 +60,13 @@ public void run() {
   Transaction tx = txManager.startShort();
   txManager.abort(tx);
 
+  if (tx.getInvalids().length == 0) {
+LOG.info("Invalid list is empty, not running transaction pruning");
--- End diff --

so should we still prune here? It won't remove any invalid tx, but it will 
cleanup the prune state. 


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


[GitHub] incubator-tephra pull request #38: TEPHRA-224 Handle delay between transacti...

2017-02-21 Thread anew
Github user anew commented on a diff in the pull request:

https://github.com/apache/incubator-tephra/pull/38#discussion_r102371884
  
--- Diff: tephra-core/src/main/java/org/apache/tephra/TxConstants.java ---
@@ -376,6 +376,11 @@
 public static final String PRUNE_FLUSH_INTERVAL = 
"data.tx.prune.flush.interval";
 
 /**
+ * The buffer in seconds used to pad transaction max lifetime while 
pruning.
+ */
+public static final String PRUNE_BUFFER_INTERVAL = 
"data.tx.prune.buffer";
--- End diff --

PRUNE_SAFETY_BUFFER? PRUNE_GRACE_PERIOD?


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


[GitHub] incubator-tephra pull request #38: TEPHRA-224 Handle delay between transacti...

2017-02-21 Thread poornachandra
Github user poornachandra commented on a diff in the pull request:

https://github.com/apache/incubator-tephra/pull/38#discussion_r102366609
  
--- Diff: 
tephra-core/src/main/java/org/apache/tephra/txprune/TransactionPruningRunnable.java
 ---
@@ -57,8 +60,13 @@ public void run() {
   Transaction tx = txManager.startShort();
   txManager.abort(tx);
 
+  if (tx.getInvalids().length == 0) {
+LOG.info("Invalid list is empty, not running transaction pruning");
--- End diff --

Yes - I was planning on making that change later since that needs some 
analysis. I'll file a JIRA for that. Is that okay?


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


[GitHub] incubator-tephra pull request #38: TEPHRA-224 Handle delay between transacti...

2017-02-21 Thread poornachandra
Github user poornachandra commented on a diff in the pull request:

https://github.com/apache/incubator-tephra/pull/38#discussion_r102366454
  
--- Diff: tephra-core/src/main/java/org/apache/tephra/TxConstants.java ---
@@ -376,6 +376,11 @@
 public static final String PRUNE_FLUSH_INTERVAL = 
"data.tx.prune.flush.interval";
 
 /**
+ * The buffer in seconds used to pad transaction max lifetime while 
pruning.
+ */
+public static final String PRUNE_BUFFER_INTERVAL = 
"data.tx.prune.buffer";
--- End diff --

What would be a good name? `PRUNE_BUFFER_TIME`?


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


[GitHub] incubator-tephra pull request #38: TEPHRA-224 Handle delay between transacti...

2017-02-21 Thread anew
Github user anew commented on a diff in the pull request:

https://github.com/apache/incubator-tephra/pull/38#discussion_r102365159
  
--- Diff: tephra-core/src/main/java/org/apache/tephra/TxConstants.java ---
@@ -376,6 +376,11 @@
 public static final String PRUNE_FLUSH_INTERVAL = 
"data.tx.prune.flush.interval";
 
 /**
+ * The buffer in seconds used to pad transaction max lifetime while 
pruning.
+ */
+public static final String PRUNE_BUFFER_INTERVAL = 
"data.tx.prune.buffer";
--- End diff --

it's not really an interval, or is it?


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


[GitHub] incubator-tephra pull request #38: TEPHRA-224 Handle delay between transacti...

2017-02-21 Thread poornachandra
GitHub user poornachandra opened a pull request:

https://github.com/apache/incubator-tephra/pull/38

TEPHRA-224 Handle delay between transaction max lifetime check and data 
writes while pruning

JIRA - https://issues.apache.org/jira/browse/TEPHRA-224

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/poornachandra/incubator-tephra 
feature/pruning-buffer

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-tephra/pull/38.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #38






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