Return-Path: X-Original-To: apmail-db-derby-commits-archive@www.apache.org Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 059D1D605 for ; Sat, 22 Sep 2012 01:09:19 +0000 (UTC) Received: (qmail 68499 invoked by uid 500); 22 Sep 2012 01:09:19 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 68461 invoked by uid 500); 22 Sep 2012 01:09:18 -0000 Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Derby Development" List-Id: Delivered-To: mailing list derby-commits@db.apache.org Received: (qmail 68453 invoked by uid 99); 22 Sep 2012 01:09:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 22 Sep 2012 01:09:18 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 22 Sep 2012 01:09:15 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id CB1D0238890D; Sat, 22 Sep 2012 01:08:31 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1388730 - in /db/derby/code/branches/10.5: ./ java/ java/client/org/apache/derby/client/net/NetCursor.java java/engine/org/apache/derby/iapi/sql/dictionary/TableDescriptor.java Date: Sat, 22 Sep 2012 01:08:31 -0000 To: derby-commits@db.apache.org From: mamta@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120922010831.CB1D0238890D@eris.apache.org> Author: mamta Date: Sat Sep 22 01:08:31 2012 New Revision: 1388730 URL: http://svn.apache.org/viewvc?rev=1388730&view=rev Log: DERBY-5358 (SYSCS_COMPRESS_TABLE failed with conglomerate not found exception) Backporting to 10.5 Modified: db/derby/code/branches/10.5/ (props changed) db/derby/code/branches/10.5/java/ (props changed) db/derby/code/branches/10.5/java/client/org/apache/derby/client/net/NetCursor.java (props changed) db/derby/code/branches/10.5/java/engine/org/apache/derby/iapi/sql/dictionary/TableDescriptor.java Propchange: db/derby/code/branches/10.5/ ------------------------------------------------------------------------------ Merged /db/derby/code/trunk:r1354015 Merged /db/derby/code/branches/10.8:r1359059 Propchange: db/derby/code/branches/10.5/java/ ------------------------------------------------------------------------------ Merged /db/derby/code/branches/10.8/java:r1359059 Propchange: db/derby/code/branches/10.5/java/client/org/apache/derby/client/net/NetCursor.java ------------------------------------------------------------------------------ --- svn:mergeinfo (added) +++ svn:mergeinfo Sat Sep 22 01:08:31 2012 @@ -0,0 +1,4 @@ +/db/derby/code/branches/10.6/java/client/org/apache/derby/client/net/NetCursor.java:942027,957000,957287,958621,962738,965351,987678,1031623,1055601,1068474,1071167,1304470,1365674 +/db/derby/code/branches/10.7/java/client/org/apache/derby/client/net/NetCursor.java:1294731,1303263,1336809,1383996,1386854 +/db/derby/code/branches/10.8/java/client/org/apache/derby/client/net/NetCursor.java:1209227-1209228,1209284,1359059 +/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetCursor.java:757811,764912,769596,769602,769606,769962,772090,772337,772449,772534,774281,777105,779681,782991,785131,785139,785163,785570,785662,788369,788670,788674,788968,789264,790218,791027,792001,792254,792434,793089,793588,794106,794276,794303,794955,795166,795459,796020,796027,796316,796372,797147,798347,798742,800523,803336,803548,803948,805696,808494,808850,809643,810860,812669,816531,816536,819006,822289,823659,824694,826263,827505,829022,829410,830545,831304,831319,832379,833430,835286,881074,881444,882732,884163,885421,885659,887246,888311,891350,892912,897161,898635,901165,901648,901760,902857,903108,905224,908418,908586,909176,910481,910511,911315,911793,915177,915733,916075,916897,917771,918152,918359,921028,927430,928065,929085,931076,934474,936215,938959,940462,940469,942286,942476,942480,942587,946794,948045,948069,951346,951366,952138,952237,952581,954748,955001,955634,956075,956445,956659,957 260,958163,958618,959550,961892,962716,964039,964402,965647,966393,967201,967304,980089,980684,986689,986834,987539,989099,998170,999119,999485,1002291,1002682,1002853,1005347,1021426,1024511,1024528,1025615,1025795,1030043,1031559,1040658,1041374,1042537,1053724,1055169,1062096,1063809,1065061,1067250,1069661,1071318,1071886,1081455,1085078,1096991,1136363,1138341,1138444,1140744,1141924,1210846,1294512,1354015,1371041,1378206 Modified: db/derby/code/branches/10.5/java/engine/org/apache/derby/iapi/sql/dictionary/TableDescriptor.java URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.5/java/engine/org/apache/derby/iapi/sql/dictionary/TableDescriptor.java?rev=1388730&r1=1388729&r2=1388730&view=diff ============================================================================== --- db/derby/code/branches/10.5/java/engine/org/apache/derby/iapi/sql/dictionary/TableDescriptor.java (original) +++ db/derby/code/branches/10.5/java/engine/org/apache/derby/iapi/sql/dictionary/TableDescriptor.java Sat Sep 22 01:08:31 2012 @@ -109,7 +109,26 @@ public class TableDescriptor extends Tup String tableName; UUID oid; int tableType; - long heapConglomNumber = -1; + + /** + *

+ * The id of the heap conglomerate for the table described by this + * instance. The value -1 means it's uninitialized, in which case it + * will be initialized lazily when {@link #getHeapConglomerateId()} is + * called. + *

+ * + *

+ * It is declared volatile to ensure that concurrent callers of + * {@code getHeapConglomerateId()} while {@code heapConglomNumber} is + * uninitialized, will either see the value -1 or the fully initialized + * conglomerate number, and never see a partially initialized value + * (as was the case in DERBY-5358 because reads/writes of a long field are + * not guaranteed to be atomic unless the field is declared volatile). + *

+ */ + private volatile long heapConglomNumber = -1; + ColumnDescriptorList columnDescriptorList; ConglomerateDescriptorList conglomerateDescriptorList; ConstraintDescriptorList constraintDescriptorList; @@ -339,8 +358,6 @@ public class TableDescriptor extends Tup public long getHeapConglomerateId() throws StandardException { - DataDictionary dd = getDataDictionary(); - ConglomerateDescriptor cd = null; /* If we've already cached the heap conglomerate number, then