You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Denys Kuzmenko (JIRA)" <ji...@apache.org> on 2018/10/15 16:49:00 UTC

[jira] [Comment Edited] (HIVE-20737) SparkContext is shared between user sessions and should be closed only when there is no active one

    [ https://issues.apache.org/jira/browse/HIVE-20737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16648315#comment-16648315 ] 

Denys Kuzmenko edited comment on HIVE-20737 at 10/15/18 4:48 PM:
-----------------------------------------------------------------

Possible race condition in SparkSession.open() in case of user queries run in parallel within a single session. 

Double-checked locking should be used in combination with WriteLock.


was (Author: dkuzmenko):
[~stakiar] Sorry, I just realised that we have only session and maintenance threads. So race condition is not possible. But I think it's better to have check condition inside of the open method to reduce risk of having it called twice.

> SparkContext is shared between user sessions and should be closed only when there is no active one
> --------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-20737
>                 URL: https://issues.apache.org/jira/browse/HIVE-20737
>             Project: Hive
>          Issue Type: Bug
>          Components: Hive
>            Reporter: Denys Kuzmenko
>            Assignee: Denys Kuzmenko
>            Priority: Major
>         Attachments: HIVE-20737.1.patch, HIVE-20737.2.patch, HIVE-20737.5.patch, HIVE-20737.6.patch, HIVE-20737.7.patch
>
>
> 1. SparkContext is shared between user sessions and should be closed only when there is no active one. 
> 2. Possible race condition in SparkSession.open() in case of user queries run in parallel within a single session.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)