livy-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aromanenko-dev <...@git.apache.org>
Subject [GitHub] incubator-livy pull request #129: [LIVY-535] Fix non-atomic session creation
Date Thu, 22 Nov 2018 14:27:01 GMT
GitHub user aromanenko-dev opened a pull request:

    https://github.com/apache/incubator-livy/pull/129

    [LIVY-535] Fix non-atomic session creation

    ## What changes were proposed in this pull request?
    
    All steps, that include check for too many sessions and creating new
    session, should be atomic operation to avoid concurrent access of
    several threads to different part of this code in the same time.
    
    https://issues.apache.org/jira/browse/LIVY-535
    
    ## How was this patch tested?
    If was tested manually on local virtual cluster with this different values of config option
`livy.server.session.max-creation`: 1, 2 and 3
    
    Then I run the following command to make sure that only allowed number of sessions were
created in the same time and others were rejected:
    `for i in {1..5}; do curl -X POST --data '{"file": "/tmp/spark-examples-2.jar", "className":
"org.apache.spark.examples.SparkPi"}' -H "Content-Type: application/json" http://localhost:8999/batches;
done`

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/aromanenko-dev/incubator-livy LIVY-535-session-max-creation

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-livy/pull/129.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #129
    
----
commit a01659af8acc5a11ce815eefb591d41748fc0901
Author: Alexey Romanenko <aromanenko.dev@...>
Date:   2018-11-22T14:03:55Z

    [LIVY-535] Fix non-atomic session creation
    
    All steps, that include check for too many sessions and creating new
    session, should be atomic operation to avoid concurrent access of
    several threads to different part of this code in the same time.

----


---

Mime
View raw message