Apache S4
  1. Apache S4
  2. S4-78

Gradle tasks don't finish as soon as possible

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.5.0
    • Fix Version/s: 0.5.0
    • Labels:
      None

      Description

      Some Gradle tasks don't finish as soon as possible, since they leave a non-daemon thread running. It seems that after a timeout (1 minute) the thread exits and the task completes.

      This is specially apparent after the improvements in build time in S4-72

      One possible workaround is to explicitly shutdown the JVM after the task is finished.

      1. S4-78.patch
        4 kB
        Daniel Gómez Ferro
      2. 0001-Explicit-shutdown.patch
        1.0 kB
        Daniel Gómez Ferro

        Activity

        Hide
        Daniel Gómez Ferro added a comment -

        This patch requests an explicit shutdown of the JVM after the task is completed.

        Before:

        $ time ./s4 s4r -b=$PWD/build.gradle myApp

        [...]

        BUILD SUCCESSFUL

        Total time: 9.418 secs

        (( long pause ))

        real 1m2.537s
        user 0m1.661s
        sys 0m0.201s

        After:

        $ time ./s4 s4r -b=$PWD/build.gradle myApp

        [...]

        BUILD SUCCESSFUL

        Total time: 2.621 secs

        real 0m3.178s
        user 0m1.541s
        sys 0m0.138s

        Show
        Daniel Gómez Ferro added a comment - This patch requests an explicit shutdown of the JVM after the task is completed. Before: $ time ./s4 s4r -b=$PWD/build.gradle myApp [...] BUILD SUCCESSFUL Total time: 9.418 secs (( long pause )) real 1m2.537s user 0m1.661s sys 0m0.201s After: $ time ./s4 s4r -b=$PWD/build.gradle myApp [...] BUILD SUCCESSFUL Total time: 2.621 secs real 0m3.178s user 0m1.541s sys 0m0.138s
        Hide
        Matthieu Morel added a comment -

        The relevant gradle issue is http://issues.gradle.org/browse/GRADLE-1939 and it's already been delayed quite a few times.

        So I am in favor of adopting your workaround, until the issue is fixed in a gradle release, and because you have good selling arguments!

        Show
        Matthieu Morel added a comment - The relevant gradle issue is http://issues.gradle.org/browse/GRADLE-1939 and it's already been delayed quite a few times. So I am in favor of adopting your workaround, until the issue is fixed in a gradle release, and because you have good selling arguments!
        Hide
        Daniel Gómez Ferro added a comment -

        This new patch only shutdowns specific tasks, otherwise nodes would be shutdown after deploying an application.

        Show
        Daniel Gómez Ferro added a comment - This new patch only shutdowns specific tasks, otherwise nodes would be shutdown after deploying an application.
        Show
        Matthieu Morel added a comment - Merged in piper branch https://git-wip-us.apache.org/repos/asf?p=incubator-s4.git;a=commit;h=5f84f1f21b62009c7345b7e61351720c53e758c4 Thanks Daniel!

          People

          • Assignee:
            Unassigned
            Reporter:
            Daniel Gómez Ferro
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development