Skip to content

Commit

Permalink
nu (#155)
Browse files Browse the repository at this point in the history
* don't force update snapshots

* proactive transaction cancellation instead of timeouts
  • Loading branch information
Hellblazer authored Nov 11, 2023
1 parent f4e8420 commit 2ac0354
Show file tree
Hide file tree
Showing 18 changed files with 689 additions and 584 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ jobs:
cache: 'maven'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build with Maven
run: mvn -batch-mode --update-snapshots clean install -Ppre --file pom.xml
run: mvn -batch-mode clean install -Ppre --file pom.xml
4 changes: 3 additions & 1 deletion choam/src/main/java/com/salesforce/apollo/choam/CHOAM.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import com.salesforce.apollo.membership.messaging.rbc.ReliableBroadcaster.MessageAdapter;
import com.salesforce.apollo.membership.messaging.rbc.ReliableBroadcaster.Msg;
import com.salesforce.apollo.utils.RoundScheduler;
import com.salesforce.apollo.utils.Utils;
import com.salesforce.apollo.utils.bloomFilters.BloomFilter;
import io.grpc.StatusRuntimeException;
import org.h2.mvstore.MVMap;
Expand Down Expand Up @@ -107,7 +108,7 @@ public CHOAM(Parameters params) {
Thread.ofVirtual().name("Linear " + params.member().getId()).factory());
combine.registerHandler((ctx, messages) -> {
try {
linear.execute(() -> combine(messages));
linear.execute(Utils.wrapped(() -> combine(messages), log));
} catch (RejectedExecutionException e) {
// ignore
}
Expand Down Expand Up @@ -683,6 +684,7 @@ private void reconfigure(Reconfigure reconfigure) {
} else {
current.set(new Client(validators, getViewId()));
}
session.setView(h);
log.info("Reconfigured to view: {} validators: {} on: {}", new Digest(reconfigure.getId()),
validators.entrySet()
.stream()
Expand Down
13 changes: 6 additions & 7 deletions choam/src/main/java/com/salesforce/apollo/choam/Parameters.java
Original file line number Diff line number Diff line change
Expand Up @@ -556,11 +556,11 @@ public Builder setMaxGossipDelay(Duration maxGossipDelay) {
public static class LimiterBuilder {
private Duration backlogDuration = Duration.ofSeconds(1);
private int backlogSize = 1_000;
private double backoffRatio = 0.9;
private double backoffRatio = 0.5;
private int initialLimit = 1_000;
private int maxLimit = 5_000;
private int minLimit = 1_000;
private Duration timeout = Duration.ofMillis(100);
private int maxLimit = 10_000;
private int minLimit = 1_00;
private Duration timeout = Duration.ofSeconds(1);

public Limiter<Void> build(String name, MetricRegistry metrics) {
final SimpleLimiter<Void> limiter = SimpleLimiter.newBuilder()
Expand Down Expand Up @@ -668,12 +668,11 @@ public static class Builder implements Cloneable {
private int regenerationCycles = 20;
private ExponentialBackoffPolicy.Builder submitPolicy = ExponentialBackoffPolicy.newBuilder()
.setInitialBackoff(
Duration.ofMillis(10))
Duration.ofMillis(500))
.setJitter(0.2)
.setMultiplier(1.6)
.setMaxBackoff(
Duration.ofMillis(
500));
Duration.ofSeconds(5));
private Duration submitTimeout = Duration.ofSeconds(30);
private int synchronizationCycles = 10;
private LimiterBuilder txnLimiterBuilder = new LimiterBuilder();
Expand Down
Loading

0 comments on commit 2ac0354

Please sign in to comment.