Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
also pass down flag to acceptor
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasIME committed Apr 26, 2024
1 parent 66b24c0 commit 8683199
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,20 @@ public static PaxosAcceptor newSplittingAcceptor(
PaxosStorageParameters params,
SplittingPaxosStateLog.LegacyOperationMarkers legacyOperationMarkers,
Optional<Long> migrateFrom) {
return newSplittingAcceptor(params, legacyOperationMarkers, migrateFrom, false);
}

public static PaxosAcceptor newSplittingAcceptor(
PaxosStorageParameters params,
SplittingPaxosStateLog.LegacyOperationMarkers legacyOperationMarkers,
Optional<Long> migrateFrom,
boolean shouldIgnoreLeaderConsistency) {
PaxosStateLog<PaxosAcceptorState> 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());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 8683199

Please sign in to comment.