Skip to content

Commit

Permalink
fixes bug writing to root tablet (apache#3897)
Browse files Browse the repository at this point in the history
When the root tablet had no location, writes to it were failing.
  • Loading branch information
keith-turner authored Oct 26, 2023
1 parent c44216d commit 759b5d5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public class RootClientTabletCache extends ClientTabletCache {
public <T extends Mutation> void binMutations(ClientContext context, List<T> mutations,
Map<String,TabletServerMutations<T>> binnedMutations, List<T> failures) {
CachedTablet rootCachedTablet = getRootTabletLocation(context);
if (rootCachedTablet != null) {
if (rootCachedTablet != null && rootCachedTablet.getTserverLocation().isPresent()) {
var tsm = new TabletServerMutations<T>(rootCachedTablet.getTserverSession().orElseThrow());
for (T mutation : mutations) {
tsm.addMutation(RootTable.EXTENT, mutation);
Expand Down

0 comments on commit 759b5d5

Please sign in to comment.