This is an automated email from the ASF dual-hosted git repository.

kturner pushed a commit to branch 2.1
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/2.1 by this push:
     new e4674f7e5e fixes #3046 limiting ample to single table (#3049)
e4674f7e5e is described below

commit e4674f7e5ee99e4f6df3890daa74f09b1d83cfba
Author: Keith Turner <ktur...@apache.org>
AuthorDate: Wed Oct 26 18:06:19 2022 +0100

    fixes #3046 limiting ample to single table (#3049)
    
    In PR #3044 a bug was introduced that made an Ample operation that was 
intended
    to read a single tables metadata read multiple tables metadata.  This change
    fixes that bug limiting the Ample read a to a single tables metadata.
---
 .../org/apache/accumulo/core/metadata/schema/TabletsMetadata.java  | 7 +++++--
 .../org/apache/accumulo/manager/tableOps/bulkVer2/LoadFiles.java   | 3 ++-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git 
a/core/src/main/java/org/apache/accumulo/core/metadata/schema/TabletsMetadata.java
 
b/core/src/main/java/org/apache/accumulo/core/metadata/schema/TabletsMetadata.java
index e586b1a6ea..87dd20a5a4 100644
--- 
a/core/src/main/java/org/apache/accumulo/core/metadata/schema/TabletsMetadata.java
+++ 
b/core/src/main/java/org/apache/accumulo/core/metadata/schema/TabletsMetadata.java
@@ -357,8 +357,11 @@ public class TabletsMetadata implements 
Iterable<TabletMetadata>, AutoCloseable
 
     @Override
     public Options overlapping(Text startRow, boolean startInclusive, Text 
endRow) {
-      var encRow = TabletsSection.encodeRow(tableId, startRow == null ? new 
Text("") : startRow);
-      this.range = new Range(encRow, startRow == null ? true : startInclusive, 
null, true);
+      var metaStartRow =
+          TabletsSection.encodeRow(tableId, startRow == null ? new Text("") : 
startRow);
+      var metaEndRow = TabletsSection.encodeRow(tableId, endRow);
+      this.range =
+          new Range(metaStartRow, startRow == null ? true : startInclusive, 
metaEndRow, true);
       this.endRow = endRow;
 
       return this;
diff --git 
a/server/manager/src/main/java/org/apache/accumulo/manager/tableOps/bulkVer2/LoadFiles.java
 
b/server/manager/src/main/java/org/apache/accumulo/manager/tableOps/bulkVer2/LoadFiles.java
index e141b57771..a9cb992b15 100644
--- 
a/server/manager/src/main/java/org/apache/accumulo/manager/tableOps/bulkVer2/LoadFiles.java
+++ 
b/server/manager/src/main/java/org/apache/accumulo/manager/tableOps/bulkVer2/LoadFiles.java
@@ -376,7 +376,8 @@ class LoadFiles extends ManagerRepo {
       }
 
       if (cmp != 0) {
-        throw new IllegalStateException("Unexpected prev end row " + 
currTablet + " " + loadRange);
+        throw new IllegalStateException(
+            "Unexpected prev end row " + currTablet.getExtent() + " " + 
loadRange);
       }
 
       // we have found the first tablet in the range, add it to the list

Reply via email to