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 86770DD5B for ; Mon, 5 Nov 2012 19:25:34 +0000 (UTC) Received: (qmail 18185 invoked by uid 500); 5 Nov 2012 19:25:34 -0000 Delivered-To: apmail-accumulo-user-archive@accumulo.apache.org Received: (qmail 18149 invoked by uid 500); 5 Nov 2012 19:25:34 -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 18141 invoked by uid 500); 5 Nov 2012 19:25:34 -0000 Delivered-To: apmail-incubator-accumulo-user@incubator.apache.org Received: (qmail 18138 invoked by uid 99); 5 Nov 2012 19:25:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Nov 2012 19:25:34 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [38.113.6.65] (HELO sneak2.sneakemail.com) (38.113.6.65) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 05 Nov 2012 19:25:24 +0000 Received: (qmail 11019 invoked from network); 5 Nov 2012 19:25:01 -0000 Received: from unknown (HELO localhost.localdomain) (192.168.0.1) by sneak2.sneakemail.com with SMTP; 5 Nov 2012 19:25:01 -0000 Received: from 209.85.214.171 by mail.sneakemail.com with SMTP; 5 Nov 2012 19:25:01 -0000 Received: (sneakemail censored 32364-1352143501-1972 #3); 5 Nov 2012 19:25:01 -0000 Received: (sneakemail censored 32364-1352143501-1972 #2); 5 Nov 2012 19:25:01 -0000 Received: (sneakemail censored 32364-1352143501-1972 #1); 5 Nov 2012 19:25:01 -0000 Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:from:to:subject:date:message-id:user-agent :content-transfer-encoding; bh=wQZxwsJMyv1UghoAAMQlHLeCW1k4sM7HVZL+PVouTiE=; b=x0/pCjCXQzptgkxF4cUFEa5tyWDBiYbSJA48HipA+qjD373btcqqDQeL492ixTcYj3 VzSqkac7DF9GjxnKdq21FRmHKmdIEYJtxmhFGiAYO07Zr+yS52MUfkZ4DsUW+cS92Etv wBVUGGyAS6O8BqEdpJPZwVcuRE9Y0jGD+nPIbV/zHxXEQq7pJxYWWl4ADnNUfxhmooOK bxcqBCoTJzGAUXMDdGUAMf46k5TohvXwxkNFRZk6sWW7qloGyBSQhFSYBIJcstHwOVf7 649pvGlJ+5dG3qFOb9YoX8kz31GCAdT35jN3MHCq0X3+yfXo3IPqYjAdJuK7qO9fF8Mp c5mg== Content-Type: text/plain; charset=UTF-8 From: "Sukant Hajra" To: accumulo-user@incubator.apache.org Subject: thread safety of IndexedDocIterator Date: Mon, 05 Nov 2012 13:24:58 -0600 Message-ID: <32364-1352143501-1972@sneakemail.com> User-Agent: Sup/git Content-Transfer-Encoding: 8bit X-Mailer: Perl5 Mail::Internet v X-Virus-Checked: Checked by ClamAV on apache.org 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. Thanks, Sukant