Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 86532 invoked from network); 29 Nov 2006 14:56:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Nov 2006 14:56:57 -0000 Received: (qmail 58966 invoked by uid 500); 29 Nov 2006 14:57:01 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 58915 invoked by uid 500); 29 Nov 2006 14:57:01 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 58894 invoked by uid 99); 29 Nov 2006 14:57:01 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Nov 2006 06:57:01 -0800 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=NO_REAL_NAME,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [192.18.1.36] (HELO gmp-ea-fw-1.sun.com) (192.18.1.36) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Nov 2006 06:56:48 -0800 Received: from d1-emea-09.sun.com ([192.18.2.119]) by gmp-ea-fw-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id kATEuPTO014681 for ; Wed, 29 Nov 2006 14:56:27 GMT Received: from conversion-daemon.d1-emea-09.sun.com by d1-emea-09.sun.com (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) id <0J9H00A01YPJNA00@d1-emea-09.sun.com> (original mail from Dyre.Tjeldvoll@Sun.COM) for derby-dev@db.apache.org; Wed, 29 Nov 2006 14:56:25 +0000 (GMT) Received: from khepri29.sun.com ([129.159.112.241]) by d1-emea-09.sun.com (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPSA id <0J9H00HZBYTZC810@d1-emea-09.sun.com>; Wed, 29 Nov 2006 14:56:24 +0000 (GMT) Date: Wed, 29 Nov 2006 15:56:23 +0100 From: Dyre.Tjeldvoll@Sun.COM Subject: Re: ArrayInputStream and performance In-reply-to: <456C726B.3000003@sbcglobal.net> Sender: Dyre.Tjeldvoll@Sun.COM To: derby-dev@db.apache.org Cc: mikem_app@sbcglobal.net Message-id: MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT References: <456B917F.4090706@apache.org> <456C726B.3000003@sbcglobal.net> User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (usg-unix-v) X-Virus-Checked: Checked by ClamAV on apache.org Mike Matrigali writes: > It would be fine to use an unchecked and/or an ASSERT based check for > readFieldLengthAndSetStreamPosition. The "store" module owns this > access and is not counting on limit checks to catch anything here. Another question: All observed calls to setLimit (single tuple select load) come from the same method: StoredPage.readRecordFromArray(...) (setLimit is also called from readRecordFromStream() but this does not seem to happen with this type of load) And the argument to setLimit()is always the local variable fieldDataLength which is the return value from StoredFieldHeader.readLengthAndSetStreamPosition(). So if readLengthAndSetStreamPosition() can update the position without checking, presumably the return value from this method can be trusted as well? Is it then necessary to check this value again in setLimit(), or could we have used an unchecked version of setLimit here? -- dt