Uploaded image for project: 'JGroups'
  1. JGroups
  2. JGRP-514

GroupRequest adjusts timeout improperly in doExecute

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 2.4.1 SP4, 2.5
    • 2.5
    • None

      As GroupRequests are alerted to new responses, the total timeout to receive all responses decreases. This makes GroupRequests return from execute() without waiting for all responses within the true timeout.

      I think this can be fixed by (in the doExecute() method ) by adding

      start_time = System.currentTimeMillis();
      timeout_time = start_time + timeout;

      and replacing

      timeout = timeout - (System.currentTimeMillis() - start_time);

      with

      timeout = timeout_time - System.currentTimeMillis();

        1. GroupRequest.java
          22 kB
          Bryan Lanoue
        2. GroupRequestTest.java
          9 kB
          Bryan Lanoue

              rhn-engineering-bban Bela Ban
              bgl314 Bryan Lanoue (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - 20 minutes
                  20m
                  Remaining:
                  Remaining Estimate - 20 minutes
                  20m
                  Logged:
                  Time Spent - Not Specified
                  Not Specified