Skip to content

Commit 8f18fcd

Browse files
authored
Revert "feat: Enable leader aware routing by default" (#2547)
Reverts #2538
1 parent 9396d8d commit 8f18fcd

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ public static class Builder
700700
private CloseableExecutorProvider asyncExecutorProvider;
701701
private String compressorName;
702702
private String emulatorHost = System.getenv("SPANNER_EMULATOR_HOST");
703-
private boolean leaderAwareRoutingEnabled = true;
703+
private boolean leaderAwareRoutingEnabled = false;
704704

705705
private Builder() {
706706
// Manually set retry and polling settings that work.

google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerOptionsTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,8 @@ public void testCompressorName() {
680680

681681
@Test
682682
public void testLeaderAwareRoutingEnablement() {
683-
assertTrue(SpannerOptions.newBuilder().setProjectId("p").build().isLeaderAwareRoutingEnabled());
683+
assertFalse(
684+
SpannerOptions.newBuilder().setProjectId("p").build().isLeaderAwareRoutingEnabled());
684685
assertTrue(
685686
SpannerOptions.newBuilder()
686687
.setProjectId("p")

0 commit comments

Comments
 (0)