accumulo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sukant Hajra" <qn2b6c2...@snkmail.com>
Subject thread safety of IndexedDocIterator
Date Mon, 05 Nov 2012 19:24:58 GMT
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

Mime
View raw message