Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: reconnect leaves event creation manager in OVERLOADED state #17658

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ public void registerEdge(
@NonNull final SolderType solderType) {
throwIfStarted();

final boolean blockingEdge = solderType == SolderType.PUT;
final boolean blockingEdge = solderType == SolderType.PUT || solderType == SolderType.DIRECT;

final ModelVertex origin = getVertex(originVertex);
final ModelVertex destination = getVertex(destinationVertex);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,7 @@ public enum SolderType {
* When data is passed to the input wire, call {@link InputWire#offer(Object)}. If the input wire has backpressure
* enabled and the input wire is full, then the data will be dropped.
*/
OFFER
OFFER,

DIRECT
}
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@
taskSchedulerInput.inject(handler, data);
}

public void direct(final IN data) {
handler.accept(data);
}

Check warning on line 114 in platform-sdk/swirlds-component-framework/src/main/java/com/swirlds/component/framework/wires/input/InputWire.java

View check run for this annotation

Codecov / codecov/patch

platform-sdk/swirlds-component-framework/src/main/java/com/swirlds/component/framework/wires/input/InputWire.java#L113-L114

Added lines #L113 - L114 were not covered by tests

/**
* Set the method that will handle data traveling over this wire.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ public void solderTo(@NonNull final InputWire<OUT> inputWire, @NonNull final Sol
case PUT -> addForwardingDestination(inputWire::put);
case INJECT -> addForwardingDestination(inputWire::inject);
case OFFER -> addForwardingDestination(inputWire::offer);
case DIRECT -> addForwardingDestination(inputWire::direct);
default -> throw new IllegalArgumentException("Unknown solder type: " + solderType);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import static com.swirlds.component.framework.schedulers.builders.TaskSchedulerConfiguration.DIRECT_THREADSAFE_CONFIGURATION;
import static com.swirlds.component.framework.schedulers.builders.TaskSchedulerConfiguration.NO_OP_CONFIGURATION;
import static com.swirlds.component.framework.wires.SolderType.DIRECT;
import static com.swirlds.component.framework.wires.SolderType.INJECT;
import static com.swirlds.component.framework.wires.SolderType.OFFER;
import static com.swirlds.platform.event.stale.StaleEventDetectorOutput.SELF_EVENT;
Expand Down Expand Up @@ -446,7 +447,8 @@ private void wire() {
}

model.getHealthMonitorWire()
.solderTo(eventCreationManagerWiring.getInputWire(EventCreationManager::reportUnhealthyDuration));
.solderTo(
eventCreationManagerWiring.getInputWire(EventCreationManager::reportUnhealthyDuration), DIRECT);

model.getHealthMonitorWire().solderTo(gossipWiring.getSystemHealthInput());

Expand Down
Loading