Skip to content
This repository was archived by the owner on Apr 7, 2026. It is now read-only.

Commit 14a5ebd

Browse files
committed
incorporate changes
1 parent ea3ec56 commit 14a5ebd

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/KeyRangeCache.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -253,10 +253,6 @@ private CachedRange findRangeLocked(ByteString key, ByteString limit, RangeMode
253253
foundGap = true;
254254
}
255255

256-
if (sampled == null) {
257-
return null;
258-
}
259-
260256
if (!foundGap || total >= minCacheEntriesForRandomPick) {
261257
CachedRange selected = sampled.getValue();
262258
selected.lastAccess = accessTimeNow();
@@ -548,7 +544,7 @@ synchronized void update(Group groupIn) {
548544
}
549545
}
550546

551-
Map<Long, CachedTablet> tabletsByUid = new HashMap<>();
547+
Map<Long, CachedTablet> tabletsByUid = new HashMap<>(tablets.size());
552548
for (CachedTablet tablet : tablets) {
553549
tabletsByUid.put(tablet.tabletUid, tablet);
554550
}

0 commit comments

Comments
 (0)