Return-Path: X-Original-To: apmail-accumulo-user-archive@www.apache.org Delivered-To: apmail-accumulo-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 72F0BD7C7 for ; Mon, 5 Nov 2012 20:30:09 +0000 (UTC) Received: (qmail 55906 invoked by uid 500); 5 Nov 2012 20:30:09 -0000 Delivered-To: apmail-accumulo-user-archive@accumulo.apache.org Received: (qmail 55873 invoked by uid 500); 5 Nov 2012 20:30:09 -0000 Mailing-List: contact user-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@accumulo.apache.org Delivered-To: mailing list user@accumulo.apache.org Received: (qmail 55864 invoked by uid 99); 5 Nov 2012 20:30:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Nov 2012 20:30:09 +0000 X-ASF-Spam-Status: No, hits=2.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_SOFTFAIL X-Spam-Check-By: apache.org Received-SPF: softfail (athena.apache.org: transitioning domain of wilhelm.von.cloud@accumulo.net does not designate 209.85.219.41 as permitted sender) Received: from [209.85.219.41] (HELO mail-oa0-f41.google.com) (209.85.219.41) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Nov 2012 20:30:02 +0000 Received: by mail-oa0-f41.google.com with SMTP id k14so6949739oag.0 for ; Mon, 05 Nov 2012 12:29:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:content-type:x-gm-message-state; bh=UpVBhC5eOXL/ySe4adzuu7iaUZzsITvdFiL/ABLwO5U=; b=SPPri0iij/7m8vm+gyLk4BLpPSYYU9InjyKSdwIrgPmuYvyWGP/lKJiUFLcfoDf+aj wj0z55Yy3HK59kyqSsriOX19KcjLEXuEa42ujn4DyrRqBCaB2ht928GOtZVYzMr3exNu B78mLzF7Kfyp0WmzFd71awjvVy5k7Km/0rbcLqSh64BTA6IA/cScLiZDiAQNKxVKQWXl NTFyLpkCx9Afv3pYl5ZVAPRo91sYh1hFNpQ4psWsyI5O+5V9AynWQQwbU8YKFNQelMqq w3LM29lKFDx6KL0NOf0mEI4vnhzyFC1ZP4g0L2l8cHjHLxy8bqQV+UtbZ0u3qRCNY8b5 9DqQ== MIME-Version: 1.0 Received: by 10.60.31.139 with SMTP id a11mr8635306oei.74.1352147381244; Mon, 05 Nov 2012 12:29:41 -0800 (PST) Received: by 10.60.131.200 with HTTP; Mon, 5 Nov 2012 12:29:40 -0800 (PST) X-Originating-IP: [144.51.26.95] In-Reply-To: References: <32364-1352143501-1972@sneakemail.com> Date: Mon, 5 Nov 2012 12:29:40 -0800 Message-ID: Subject: Re: thread safety of IndexedDocIterator From: William Slacum To: user@accumulo.apache.org Content-Type: multipart/alternative; boundary=e89a8fb1ff9857d49504cdc55800 X-Gm-Message-State: ALoCoQmV7+HSqpBzDWy3qEPxV5mFJDLdUcgUrKqdPRWUEV3dL9sBniJ4/1+WCA1mqYfnc5NPLxEt X-Virus-Checked: Checked by ClamAV on apache.org --e89a8fb1ff9857d49504cdc55800 Content-Type: text/plain; charset=ISO-8859-1 At one point, Keith had warned me against kicking off threads inside a scan session. Is it possible we could have a discussion on the implications of this? On Mon, Nov 5, 2012 at 11:30 AM, Billie Rinaldi wrote: > On Mon, Nov 5, 2012 at 11:24 AM, Sukant Hajra wrote: > >> We noticed that IndexedDocIterator.java has the following private static >> fields: >> >> private static Text indexColf = DEFAULT_INDEX_COLF; >> private static Text docColf = DEFAULT_DOC_COLF; >> >> The init method, which sets these is synchronized. Still, though, this >> synchronization doesn't seem enough to allow different runs of the >> iterator to >> use different values for indexColf and docColf. One run will set the >> "Colf" >> variables one way atomically in the synchronized init method. . . and >> another >> run and immediately interleave in alternate "Colf" settings, which breaks >> the >> original iterator run. >> >> For now, we're not touching the indexColf and docColf, just leaving it as >> the >> defaults. >> >> We're not blocked by this. We're just curious if there's a bug in this >> design. >> Also, if it's not a defect, we're interested in learning what system >> invariant >> of iterator execution makes this not a problem. >> > > Sounds like a bug. Feel free to open a ticket! > > Billie > > > >> >> Thanks, >> Sukant >> > > --e89a8fb1ff9857d49504cdc55800 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable At one point, Keith had warned me against kicking off threads inside a scan= session. Is it possible we could have a discussion on the implications of = this?

On Mon, Nov 5, 2012 at 11:30 AM, Bi= llie Rinaldi <billie@apache.org> wrote:
On M= on, Nov 5, 2012 at 11:24 AM, Sukant Hajra <qn2b6c2b9w@snkmail.com= > wrote:
We noticed that IndexedDocIterator.java has the following private static fields:

=A0 =A0 private static Text indexColf =3D DEFAULT_INDEX_COLF;
=A0 =A0 private static Text docColf =3D DEFAULT_DOC_COLF;

The init method, which sets these is synchronized. =A0Still, though, this synchronization doesn't seem enough to allow different runs of the iter= ator to
use different values for indexColf and docColf. =A0One run will set the &qu= ot;Colf"
variables one way atomically in the synchronized init method. . . and anoth= er
run and immediately interleave in alternate "Colf" settings, whic= h breaks the
original iterator run.

For now, we're not touching the indexColf and docColf, just leaving it = as the
defaults.

We're not blocked by this. =A0We're just curious if there's a b= ug in this design.
Also, if it's not a defect, we're interested in learning what syste= m invariant
of iterator execution makes this not a problem.

Sounds like a bug.=A0 Feel free to open a ticket!

Billie
=A0

Thanks,
Sukant


--e89a8fb1ff9857d49504cdc55800--