Return-Path: X-Original-To: apmail-hive-issues-archive@minotaur.apache.org Delivered-To: apmail-hive-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 13E39100D8 for ; Sat, 24 Oct 2015 16:42:28 +0000 (UTC) Received: (qmail 40697 invoked by uid 500); 24 Oct 2015 16:42:28 -0000 Delivered-To: apmail-hive-issues-archive@hive.apache.org Received: (qmail 40652 invoked by uid 500); 24 Oct 2015 16:42:27 -0000 Mailing-List: contact issues-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list issues@hive.apache.org Received: (qmail 40637 invoked by uid 99); 24 Oct 2015 16:42:27 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Oct 2015 16:42:27 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id BA7702C044E for ; Sat, 24 Oct 2015 16:42:27 +0000 (UTC) Date: Sat, 24 Oct 2015 16:42:27 +0000 (UTC) From: "Chaoyu Tang (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-12248) The rawStore used in DBTokenStore should be thread-safe MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-12248?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Chaoyu Tang updated HIVE-12248: ------------------------------- Attachment: HIVE-12245.patch > The rawStore used in DBTokenStore should be thread-safe > ------------------------------------------------------- > > Key: HIVE-12248 > URL: https://issues.apache.org/jira/browse/HIVE-12248 > Project: Hive > Issue Type: Bug > Components: Authentication > Reporter: Chaoyu Tang > Assignee: Chaoyu Tang > > A non-thread-safe implementation of RawStore, particularly ObjectStore, set in DBTokenStore is being shared by multi-threads, which causes the race condition in DataNuclues to access the backend DB. > The DN PersistenceManager(PM) in ObjectStore is not thread safe, so DBTokenStore should use a ThreadLocal ObjectStore. > Following errors might be root caused by the race condition in DN PM. > {code} > Object of type "org.apache.hadoop.hive.metastore.model.MDelegationToken" is detached. Detached objects cannot be used with this operation. > org.datanucleus.exceptions.ObjectDetachedException: Object of type "org.apache.hadoop.hive.metastore.model.MDelegationToken" is detached. Detached objects cannot be used with this operation. > at org.datanucleus.ExecutionContextImpl.assertNotDetached(ExecutionContextImpl.java:5728) > at org.datanucleus.ExecutionContextImpl.retrieveObject(ExecutionContextImpl.java:1859) > at org.datanucleus.ExecutionContextThreadedImpl.retrieveObject(ExecutionContextThreadedImpl.java:203) > at org.datanucleus.api.jdo.JDOPersistenceManager.jdoRetrieve(JDOPersistenceManager.java:605) > at org.datanucleus.api.jdo.JDOPersistenceManager.retrieveAll(JDOPersistenceManager.java:693) > at org.datanucleus.api.jdo.JDOPersistenceManager.retrieveAll(JDOPersistenceManager.java:713) > at org.apache.hadoop.hive.metastore.ObjectStore.getAllTokenIdentifiers(ObjectStore.java:6517) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)