From issues-return-13564-archive-asf-public=cust-asf.ponee.io@sentry.apache.org Fri Apr 20 16:54:04 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 714C618076D for ; Fri, 20 Apr 2018 16:54:03 +0200 (CEST) Received: (qmail 10268 invoked by uid 500); 20 Apr 2018 14:54:02 -0000 Mailing-List: contact issues-help@sentry.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@sentry.apache.org Received: (qmail 10259 invoked by uid 99); 20 Apr 2018 14:54:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Apr 2018 14:54:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 252E61807BC for ; Fri, 20 Apr 2018 14:54:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.511 X-Spam-Level: X-Spam-Status: No, score=-109.511 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id qrNrub0gD2TM for ; Fri, 20 Apr 2018 14:54:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 10FDC5FD3E for ; Fri, 20 Apr 2018 14:54:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 85CC4E0CC1 for ; Fri, 20 Apr 2018 14:54:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 455CE241C6 for ; Fri, 20 Apr 2018 14:54:00 +0000 (UTC) Date: Fri, 20 Apr 2018 14:54:00 +0000 (UTC) From: "Xinran Tinney (JIRA)" To: issues@sentry.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (SENTRY-2200) Migrate 3.x Datanucleus unsupported configurations to 4.1 Datanucleus 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/SENTRY-2200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Xinran Tinney updated SENTRY-2200: ---------------------------------- Status: Patch Available (was: In Progress) > Migrate 3.x Datanucleus unsupported configurations to 4.1 Datanucleus > ---------------------------------------------------------------------- > > Key: SENTRY-2200 > URL: https://issues.apache.org/jira/browse/SENTRY-2200 > Project: Sentry > Issue Type: Bug > Components: Sentry > Affects Versions: 2.1.0 > Reporter: Na Li > Assignee: Xinran Tinney > Priority: Major > Attachments: SENTRY-2200.001.patch > > > Since 2.0, the datanucleus version in Sentry changed from 3.2 to 4.1. > Based on the datanucleus documentation following config names are renamed. Sentry has several places use those configuration names. We should update the config names to reflect the correct names. > {noformat} > Migration from 3.3.7 to 4.0.0.M1 > Migrating will require the following changes > Persistence property datanucleus.allowAttachOfTransient now defaults to true for JPA usage; set it explicitly to get old behaviour > Persistence property datanucleus.metadata.validate was removed (replaced by datanucleus.metadata.xml.validate some time back) > Persistence property datanucleus.defaultInheritanceStrategy is renamed to datanucleus.metadata.defaultInheritanceStrategy > Persistence property datanucleus.autoCreateSchema is renamed to datanucleus.schema.autoCreateAll > Persistence property datanucleus.autoCreateTables is renamed to datanucleus.schema.autoCreateTables > Persistence property datanucleus.autoCreateColumns is renamed to datanucleus.schema.autoCreateColumns > Persistence property datanucleus.autoCreateConstraints is renamed to datanucleus.schema.autoCreateConstraints > Persistence property datanucleus.validateSchema is renamed to datanucleus.schema.validateAll > Persistence property datanucleus.validateTables is renamed to datanucleus.schema.validateTables > Persistence property datanucleus.validateColumns is renamed to datanucleus.schema.validateColumns > Persistence property datanucleus.validateConstraints is renamed to datanucleus.schema.validateConstraints > Persistence property datanucleus.fixedDatastore is now removed, since it only equated to setting the "autoCreate" properties to false.{noformat} > One example in SentryStore > {code} > public SentryStore(Configuration conf) throws Exception { > this.conf = conf; > Properties prop = getDataNucleusProperties(conf); > boolean checkSchemaVersion = conf.get( > ServerConfig.SENTRY_VERIFY_SCHEM_VERSION, > ServerConfig.SENTRY_VERIFY_SCHEM_VERSION_DEFAULT).equalsIgnoreCase( > "true"); > if (!checkSchemaVersion) { > prop.setProperty("datanucleus.autoCreateSchema", "true"); > prop.setProperty("datanucleus.fixedDatastore", "false"); > } > {code} > In ServiceConstants > {code} > public static final ImmutableMap SENTRY_STORE_DEFAULTS = > ImmutableMap.builder() > .put("datanucleus.connectionPoolingType", "BoneCP") > .put("datanucleus.validateTables", "false") > .put("datanucleus.validateColumns", "false") > .put("datanucleus.validateConstraints", "false") > .put("datanucleus.storeManagerType", "rdbms") > .put("datanucleus.autoCreateSchema", "false") > .put("datanucleus.fixedDatastore", "true") > .put("datanucleus.autoStartMechanismMode", "checked") > .put(DATANUCLEUS_ISOLATION_LEVEL, DATANUCLEUS_REPEATABLE_READ) > .put("datanucleus.cache.level2", "false") > .put("datanucleus.cache.level2.type", "none") > .put("datanucleus.query.sql.allowAll", "true") > .put("datanucleus.identifierFactory", "datanucleus1") > .put("datanucleus.rdbms.useLegacyNativeValueStrategy", "true") > .put("datanucleus.plugin.pluginRegistryBundleCheck", "LOG") > .put("javax.jdo.PersistenceManagerFactoryClass", > "org.datanucleus.api.jdo.JDOPersistenceManagerFactory") > .put("javax.jdo.option.DetachAllOnCommit", "true") > .put("javax.jdo.option.NonTransactionalRead", "false") > .put("javax.jdo.option.NonTransactionalWrite", "false") > .put("javax.jdo.option.Multithreaded", "true") > .build(); > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)