tephra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From poornachandra <...@git.apache.org>
Subject [GitHub] incubator-tephra pull request #42: TEPHRA-228 Adding the ability to pass-in ...
Date Wed, 17 May 2017 23:09:22 GMT
Github user poornachandra commented on a diff in the pull request:

    https://github.com/apache/incubator-tephra/pull/42#discussion_r117127048
  
    --- Diff: tephra-core/src/main/java/org/apache/tephra/TransactionManager.java ---
    @@ -347,15 +346,17 @@ private void cleanupTimedOutTransactions() {
             long currentTime = System.currentTimeMillis();
             Map<Long, InProgressType> timedOut = Maps.newHashMap();
             for (Map.Entry<Long, InProgressTx> tx : inProgress.entrySet()) {
    -          long expiration = tx.getValue().getExpiration();
    +          InProgressTx inProgressTx = tx.getValue();
    +          long expiration = inProgressTx.getExpiration();
               if (expiration >= 0L && currentTime > expiration) {
                 // timed out, remember tx id (can't remove while iterating over entries)
    -            timedOut.put(tx.getKey(), tx.getValue().getType());
    -            LOG.info("Tx invalid list: added tx {} because of timeout", tx.getKey());
    +            timedOut.put(tx.getKey(), inProgressTx.getType());
    +            String clientId = inProgressTx.getClientId() != null ? inProgressTx.getClientId()
: "unknown";
    +            LOG.info("Tx invalid list: added tx {} belonging to client '{}' because of
timeout.",
    --- End diff --
    
    Let's add the client id to the log message in `doInvalidate` too.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message