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

Commit

Permalink
Rip out multi-leader paxos and timestamp paxos batching
Browse files Browse the repository at this point in the history
  • Loading branch information
ergo14 committed Nov 8, 2024
1 parent 3cb5a8a commit 5e7d210
Show file tree
Hide file tree
Showing 100 changed files with 169 additions and 6,965 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
import com.palantir.timelock.config.ImmutableSqlitePaxosPersistenceConfiguration;
import com.palantir.timelock.config.ImmutableTimeLockRuntimeConfiguration;
import com.palantir.timelock.config.PaxosInstallConfiguration;
import com.palantir.timelock.config.PaxosInstallConfiguration.PaxosLeaderMode;
import com.palantir.timelock.config.TimeLockInstallConfiguration;
import com.palantir.timelock.config.TimeLockRuntimeConfiguration;
import com.palantir.timestamp.ManagedTimestampService;
Expand Down Expand Up @@ -106,7 +105,6 @@ void setClient(String client) {
public void setup() {
PaxosInstallConfiguration paxos = PaxosInstallConfiguration.builder()
.dataDirectory(tryCreateSubFolder())
.leaderMode(PaxosLeaderMode.SINGLE_LEADER)
.sqlitePersistence(ImmutableSqlitePaxosPersistenceConfiguration.builder()
.dataDirectory(tryCreateSubFolder())
.build())
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package com.palantir.atlasdb.timelock.paxos;

import com.google.common.collect.ImmutableList;
import com.palantir.paxos.LeaderPinger;
import com.palantir.paxos.PaxosAcceptorNetworkClient;
import com.palantir.paxos.PaxosConstants;
Expand Down Expand Up @@ -49,39 +48,13 @@ interface PaxosLatestRoundVerifierFactory {
PaxosLatestRoundVerifier create(PaxosAcceptorNetworkClient acceptorNetworkClient);
}

@Value.Immutable
abstract class BatchingLeaderPingerFactory implements LeaderPingerFactoryContainer, Dependencies.LeaderPinger {

@Value.Derived
AutobatchingPingableLeaderFactory pingableLeaderFactory() {
return AutobatchingPingableLeaderFactory.create(
WithDedicatedExecutor.convert(remoteClients().batchPingableLeadersWithContext()),
leaderPingRate(),
leaderPingResponseWait(),
leaderUuid());
}

@Override
public NetworkClientFactories.Factory<LeaderPinger> get() {
return pingableLeaderFactory()::leaderPingerFor;
}

@Override
@Value.Derived
public List<Closeable> closeables() {
return ImmutableList.of(pingableLeaderFactory());
}

public abstract static class Builder implements LeaderPingerFactoryContainer.Builder {}
}

@Value.Immutable
abstract class SingleLeaderPingerFactory implements LeaderPingerFactoryContainer, Dependencies.LeaderPinger {

@Value.Derived
SingleLeaderPinger pinger() {
return SingleLeaderPinger.create(
WithDedicatedExecutor.convert(remoteClients().nonBatchPingableLeadersWithContext()),
WithDedicatedExecutor.convert(remoteClients().pingableLeadersWithContext()),
dataSource(),
leaderPingResponseWait(),
greenNodeLeadershipBackoff(),
Expand Down

This file was deleted.

Loading

0 comments on commit 5e7d210

Please sign in to comment.