This is an automated email from the ASF dual-hosted git repository. ctubbsii pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/accumulo.git
commit 6bd1534d88948a7af4971f785ea3f7334eca45b2 Merge: 2d03958b9f 7ac517b44e Author: Christopher Tubbs <[email protected]> AuthorDate: Tue Aug 12 20:19:47 2025 -0400 Merge branch '2.1' .../accumulo/core/iterators/user/VisibilityFilter.java | 9 +++++++++ .../accumulo/core/iterators/user/VisibilityFilterTest.java | 14 ++++++++++++++ 2 files changed, 23 insertions(+) diff --cc core/src/main/java/org/apache/accumulo/core/iterators/user/VisibilityFilter.java index 0d04b8ba7e,b1614dbca3..3116810704 --- a/core/src/main/java/org/apache/accumulo/core/iterators/user/VisibilityFilter.java +++ b/core/src/main/java/org/apache/accumulo/core/iterators/user/VisibilityFilter.java @@@ -73,13 -71,18 +73,22 @@@ public class VisibilityFilter extends F this.cache = new LRUMap<>(1000); } + @Override + public SortedKeyValueIterator<Key,Value> deepCopy(IteratorEnvironment env) { + VisibilityFilter result = (VisibilityFilter) super.deepCopy(env); + result.filterInvalid = this.filterInvalid; + result.ve = this.ve; + result.cache = this.cache; + return result; + } + @Override public boolean accept(Key k, Value v) { - ByteSequence testVis = k.getColumnVisibilityData(); + // The following call will replace the contents of testVis + // with the bytes for the column visibility for k. Any cached + // version of testVis needs to be a copy to avoid modifying + // the cached version. + k.getColumnVisibilityData(testVis); if (filterInvalid) { Boolean b = cache.get(testVis); if (b != null) {
