Skip to content

Commit

Permalink
revert dat and clean
Browse files Browse the repository at this point in the history
  • Loading branch information
Hellblazer committed Apr 13, 2024
1 parent e9362f7 commit 17da122
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 5 deletions.
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 @@ -1237,7 +1237,9 @@ public Logger log() {
@Override
public void nextView(Context<Member> pendingView) {
var previous = CHOAM.this.pendingView.getAndSet(pendingView);
log.info("Pending view: {} size: {} on: {}", nextViewId.get(), pendingView.size(), params.member().getId());
log.info("Pending context for view: {} size: {} on: {}",
nextViewId.get() == null ? "<null>" : nextViewId.get(), pendingView.size(),
params.member().getId());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public static <T> CompletableFuture<T> retryNesting(Supplier<CompletableFuture<T
for (int i = 0; i < maxRetries; i++) {
final var attempt = i;
cf = cf.thenApply(CompletableFuture::completedFuture).exceptionally(__ -> {
log.warn("resubmitting, next attempt: {}", attempt);
log.trace("resubmitting after attempt: {}", attempt + 1);
return supplier.get();
}).thenCompose(java.util.function.Function.identity());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ void commit(Digest digest, short member) {
return;
}

// Check for existing proposal
// Check for an existing proposal
if (wpu == null) {
log.trace("Committed, but no proposal: {} count: {} on: {}", digest, committed.size(), conf.logLabel());
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ private Ethereal(String label, Config conf, int maxSerializedSize, DataSource ds
log.trace("Sending: {} on: {}", u, config.logLabel());
insert(u);
}, epoch -> new epochProofImpl(config, epoch, new sharesDB(config, new ConcurrentHashMap<>())));

log.trace("Configured {} processes {}", config.nProc(), config.logLabel());
}

private static ThreadPoolExecutor consumer(String label) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ private Update gossipRound(Gossiper link, int ring) {
*/
private void handle(Optional<Update> result, RingCommunications.Destination<Member, Gossiper> destination,
Duration duration, ScheduledExecutorService scheduler, Timer.Context timer) {
if (!started.get() || destination.link() == null) {
if (!started.get() || destination == null || destination.link() == null) {
if (timer != null) {
timer.stop();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1508,7 +1508,7 @@ public static BitSet createInitialMask(DynamicContext<?> context) {
int nbits = context.getRingCount();
BitSet mask = new BitSet(nbits);
List<Boolean> random = new ArrayList<>();
for (int i = 0; i < ((context.getBias() - 1) * context.toleranceLevel()) + 1; i++) {
for (int i = 0; i < context.majority(); i++) {
random.add(true);
}
for (int i = 0; i < context.toleranceLevel(); i++) {
Expand Down
1 change: 1 addition & 0 deletions grpc/src/main/proto/choam.proto
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ message Validate {
message Reassemble {
repeated SignedViewMember members = 1;
repeated Validate validations = 2;
repeated crypto.Digeste slate = 3;
}

message Validations {
Expand Down

0 comments on commit 17da122

Please sign in to comment.