accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scubafuchs <>
Subject [GitHub] accumulo pull request #244: Discuss ACCUMULO-3079: collapsing the iterator s...
Date Thu, 20 Apr 2017 19:04:27 GMT
Github user scubafuchs commented on a diff in the pull request:
    --- Diff: core/src/main/java/org/apache/accumulo/core/iterators/system/
    @@ -16,63 +16,59 @@
     package org.apache.accumulo.core.iterators.system;
    -import org.apache.accumulo.core.iterators.Filter;
     import org.apache.accumulo.core.iterators.IteratorEnvironment;
     import org.apache.accumulo.core.iterators.SortedKeyValueIterator;
    +import org.apache.accumulo.core.iterators.SynchronizedServerFilter;
     import org.apache.accumulo.core.util.BadArgumentException;
    -import org.apache.accumulo.core.util.TextUtil;
     import org.slf4j.Logger;
     import org.slf4j.LoggerFactory;
    -public class VisibilityFilter extends Filter {
    +public class VisibilityFilter extends SynchronizedServerFilter {
    --- End diff --
    We used to have a separate SynchronizedIterator on scan scope that wrapped all of the
system iterators and this moves that same functionality down into the VisibilityFilter. The
purpose of synchronization is to prevent leakage of intermediate values through methods like
getTopKey and getTopValue while another thread is calling next. This is only necessary when
a configurable iterator does something multi-threaded. There are at least a couple of ways
to avoid the need to make this iterator synchronized: (1) make the system iterators thread
safe as exposed by the top iterator in some other way, at least from a security perspective,
or (2) detect and/or disallow any use of threading in configurable iterators. Maybe you can
do (1) by eliminating the possibility of leaking top keys and values that are still being
evaluated by the filter? Probably needs a test to make sure we don't break that in the future.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message