diff --git a/leader-election-impl/src/main/java/com/palantir/paxos/PaxosAcceptorImpl.java b/leader-election-impl/src/main/java/com/palantir/paxos/PaxosAcceptorImpl.java index 628765fe554..b2bb883101a 100644 --- a/leader-election-impl/src/main/java/com/palantir/paxos/PaxosAcceptorImpl.java +++ b/leader-election-impl/src/main/java/com/palantir/paxos/PaxosAcceptorImpl.java @@ -35,11 +35,20 @@ public static PaxosAcceptor newSplittingAcceptor( PaxosStorageParameters params, SplittingPaxosStateLog.LegacyOperationMarkers legacyOperationMarkers, Optional migrateFrom) { + return newSplittingAcceptor(params, legacyOperationMarkers, migrateFrom, false); + } + + public static PaxosAcceptor newSplittingAcceptor( + PaxosStorageParameters params, + SplittingPaxosStateLog.LegacyOperationMarkers legacyOperationMarkers, + Optional migrateFrom, + boolean shouldIgnoreLeaderConsistency) { PaxosStateLog stateLog = SplittingPaxosStateLog.createWithMigration( params, PaxosAcceptorState.BYTES_HYDRATOR, legacyOperationMarkers, - migrateFrom.map(OptionalLong::of).orElseGet(OptionalLong::empty)); + migrateFrom.map(OptionalLong::of).orElseGet(OptionalLong::empty), + shouldIgnoreLeaderConsistency); return new PaxosAcceptorImpl(new ConcurrentSkipListMap<>(), stateLog, stateLog.getGreatestLogEntry()); } diff --git a/timelock-impl/src/main/java/com/palantir/atlasdb/timelock/paxos/LocalPaxosComponents.java b/timelock-impl/src/main/java/com/palantir/atlasdb/timelock/paxos/LocalPaxosComponents.java index 9267cfd0a74..92b0163b8c3 100644 --- a/timelock-impl/src/main/java/com/palantir/atlasdb/timelock/paxos/LocalPaxosComponents.java +++ b/timelock-impl/src/main/java/com/palantir/atlasdb/timelock/paxos/LocalPaxosComponents.java @@ -217,7 +217,8 @@ private Components createComponents(Client client, boolean shouldIgnoreLeaderCon PaxosAcceptor acceptor = PaxosAcceptorImpl.newSplittingAcceptor( getAcceptorParameters(client), createMetrics(PaxosAcceptor.class), - learner.getGreatestLearnedValue().map(PaxosValue::getRound)); + learner.getGreatestLearnedValue().map(PaxosValue::getRound), + shouldIgnoreLeaderConsistency); PingableLeader localPingableLeader = new LocalPingableLeader(learner, leaderUuid, timeLockVersion); return ImmutableComponents.builder()