xadisk
  1. xadisk
  2. XADISK-92

TransactionTimeoutDetector can use a more precise calculation to decide if a session has timed out.

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.1
    • Fix Version/s: 1.2
    • Component/s: filesystem
    • Labels:
      None

      Description

      The current calculation truncates the times to seconds beforehand, leading to loss of precision upto 1 second:

      _____________________________________________________________
      int timeoutValue = session.getTransactionTimeout();
      int birthTime = (int) (session.getTimeOfEntryToTransaction() / 1000);
      int timeNow = (int) (System.currentTimeMillis() / 1000);
      _____________________________________________________________

      This can be made better by:

      _____________________________________________________________
      long timeoutValue = session.getTransactionTimeout() * 1000;
      long birthTime = session.getTimeOfEntryToTransaction();
      long timeNow = System.currentTimeMillis();
      _____________________________________________________________

        Activity

        Hide
        Nitin Verma added a comment -

        Checked-in the changes to trunk.

        Show
        Nitin Verma added a comment - Checked-in the changes to trunk.

          People

          • Assignee:
            Nitin Verma
            Reporter:
            Nitin Verma
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: