This is an automated email from the ASF dual-hosted git repository. cshannon pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/accumulo.git
commit 84e8557ab8ddabd23c8813d9dbed2e1223d99646 Merge: b912506d43 90bcb465fe Author: Christopher L. Shannon <cshan...@apache.org> AuthorDate: Sat Apr 6 15:23:23 2024 -0400 Merge branch '2.1' .../org/apache/accumulo/core/metadata/TabletLocationState.java | 3 ++- .../org/apache/accumulo/core/metadata/schema/TabletMetadata.java | 4 +++- .../apache/accumulo/core/metadata/schema/TabletMetadataTest.java | 8 ++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --cc core/src/main/java/org/apache/accumulo/core/metadata/TabletLocationState.java index eeaa5cde95,0a70594027..4c2421b4e8 --- a/core/src/main/java/org/apache/accumulo/core/metadata/TabletLocationState.java +++ b/core/src/main/java/org/apache/accumulo/core/metadata/TabletLocationState.java @@@ -57,8 -57,9 +58,8 @@@ public class TabletLocationState } public TabletLocationState(KeyExtent extent, Location future, Location current, Location last, - SuspendingTServer suspend, Collection<Collection<String>> walogs, boolean chopped) - throws BadLocationStateException { + SuspendingTServer suspend, Collection<LogEntry> walogs) throws BadLocationStateException { - this.extent = extent; + this.extent = Objects.requireNonNull(extent); this.future = validateLocation(future, TabletMetadata.LocationType.FUTURE); this.current = validateLocation(current, TabletMetadata.LocationType.CURRENT); this.last = validateLocation(last, TabletMetadata.LocationType.LAST); diff --cc core/src/main/java/org/apache/accumulo/core/metadata/schema/TabletMetadata.java index af31605d51,c1e816109a..b98d9e8540 --- a/core/src/main/java/org/apache/accumulo/core/metadata/schema/TabletMetadata.java +++ b/core/src/main/java/org/apache/accumulo/core/metadata/schema/TabletMetadata.java @@@ -371,7 -373,9 +371,9 @@@ public class TabletMetadata future = location; } // only care about the state so don't need walogs and chopped params - var tls = new TabletLocationState(extent, future, current, last, suspend, null); + // Use getExtent() when passing the extent as the private reference may not have been + // initialized yet. This will also ensure PREV_ROW was fetched - var tls = new TabletLocationState(getExtent(), future, current, last, suspend, null, false); ++ var tls = new TabletLocationState(getExtent(), future, current, last, suspend, null); return tls.getState(liveTServers); } catch (TabletLocationState.BadLocationStateException blse) { throw new IllegalArgumentException("Error creating TabletLocationState", blse);