Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-2485

DefaultExecutorService.DistributedTaskBuilder timeout(long to, TimeUnit u) doesn't use the passed to timeout

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Done
    • None
    • None
    • Clustered Executor
    • None

    Description

      Hi,

      the issue is the following:

      1. DistributedTaskBuilder is created with callable which sleeps for 10 seconds.

      2. The timeout is set to DistributedTaskBuilder for 10 milliseconds.

      3. Then the built DistributedTask is executed with DefaultExecutorService on the different node rather than the executorservice was attached to.

      4. In 10 milliseconds, the TimeoutException should be thrown, but it doesn't.

      The thing is, that although timeout is passed to timeout(long timeout, TimeUnit unit) method of DefaultExecutorService.DistributedTaskBuilder class, but the method parses and sets not the passed value, but the one which was given to task builder during initialization.

      Please find the reproducing test here:
      https://github.com/andyuk1986/infinispan/blob/DIST_EXEC_TESTS/core/src/test/java/org/infinispan/distexec/DistributedExecutorTest.java

      Please find the proposed fix here:
      https://github.com/andyuk1986/infinispan/blob/DIST_EXEC_TESTS/core/src/main/java/org/infinispan/distexec/DefaultExecutorService.java (line 734)

      Attachments

        Activity

          People

            vblagoje Vladimir Blagojevic (Inactive)
            amanukya@redhat.com Anna Manukyan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: