Skip to content

Commit

Permalink
chore: disabled new backpressure via settings (#13646)
Browse files Browse the repository at this point in the history
Signed-off-by: Cody Littley <[email protected]>
  • Loading branch information
cody-littley authored Jun 3, 2024
1 parent cfde66d commit e6cf2ad
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 20 deletions.
2 changes: 1 addition & 1 deletion platform-sdk/docs/core/wiring-diagram.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
*/
@ConfigData("platform.wiring")
public record WiringConfig(
@ConfigProperty(defaultValue = "true") boolean healthMonitorEnabled,
@ConfigProperty(defaultValue = "false") boolean hardBackpressureEnabled,
@ConfigProperty(defaultValue = "false") boolean healthMonitorEnabled,
@ConfigProperty(defaultValue = "true") boolean hardBackpressureEnabled,
@ConfigProperty(defaultValue = "1.0") double defaultPoolMultiplier,
@ConfigProperty(defaultValue = "0") int defaultPoolConstant,
@ConfigProperty(defaultValue = "500") int healthMonitorSchedulerCapacity,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@
@ConfigData("consensus")
public record ConsensusConfig(
@ConfigProperty(defaultValue = "26") int roundsNonAncient,
@ConfigProperty(defaultValue = "2000") int roundsExpired,
@ConfigProperty(defaultValue = "500") int roundsExpired,
@ConfigProperty(defaultValue = "12") int coinFreq) {}
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@ public record EventCreationConfig(
@ConfigProperty(defaultValue = "10") double antiSelfishnessFactor,
@ConfigProperty(defaultValue = "10") int tipsetSnapshotHistorySize,
@ConfigProperty(defaultValue = "1024") int eventIntakeThrottle,
@ConfigProperty(defaultValue = "false") boolean useLegacyBackpressure,
@ConfigProperty(defaultValue = "true") boolean useLegacyBackpressure,
@ConfigProperty(defaultValue = "5s") Duration maximumPermissibleUnhealthyDuration) {}
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public record EventConfig(
@ConfigProperty(defaultValue = "/opt/hgcapp/eventsStreams") String eventsLogDir,
@ConfigProperty(defaultValue = "true") boolean enableEventStreaming,
@ConfigProperty(defaultValue = "false") boolean useBirthRoundAncientThreshold,
@ConfigProperty(defaultValue = "false") boolean useOldStyleIntakeQueue) {
@ConfigProperty(defaultValue = "true") boolean useOldStyleIntakeQueue) {

/**
* @return the {@link AncientMode} based on useBirthRoundAncientThreshold
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@
public record SyncConfig(
@ConfigProperty(defaultValue = "25") int syncSleepAfterFailedNegotiation,
@ConfigProperty(defaultValue = "17") int syncProtocolPermitCount,
@ConfigProperty(defaultValue = "true") boolean onePermitPerPeer,
@ConfigProperty(defaultValue = "false") boolean onePermitPerPeer,
@ConfigProperty(defaultValue = "1000") int syncProtocolHeartbeatPeriod,
@ConfigProperty(defaultValue = "true") boolean waitForEventsInIntake,
@ConfigProperty(defaultValue = "true") boolean filterLikelyDuplicates,
@ConfigProperty(defaultValue = "3s") Duration nonAncestorFilterThreshold,
@ConfigProperty(defaultValue = "500ms") Duration syncKeepalivePeriod,
@ConfigProperty(defaultValue = "1m") Duration maxSyncTime,
@ConfigProperty(defaultValue = "5000") int maxSyncEventCount,
@ConfigProperty(defaultValue = "0") int maxSyncEventCount,
@ConfigProperty(defaultValue = "5s") Duration unhealthyGracePeriod,
@ConfigProperty(defaultValue = "5") double permitsRevokedPerSecond,
@ConfigProperty(defaultValue = "0.1") double permitsReturnedPerSecond,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,19 @@
@ConfigData("platformSchedulers")
public record PlatformSchedulersConfig(
@ConfigProperty(defaultValue = "500") int eventHasherUnhandledCapacity,
@ConfigProperty(defaultValue = "CONCURRENT CAPACITY(5000) FLUSHABLE UNHANDLED_TASK_METRIC")
@ConfigProperty(defaultValue = "SEQUENTIAL CAPACITY(500) FLUSHABLE UNHANDLED_TASK_METRIC")
TaskSchedulerConfiguration internalEventValidator,
@ConfigProperty(defaultValue = "SEQUENTIAL CAPACITY(5000) FLUSHABLE UNHANDLED_TASK_METRIC")
@ConfigProperty(defaultValue = "SEQUENTIAL CAPACITY(500) FLUSHABLE UNHANDLED_TASK_METRIC")
TaskSchedulerConfiguration eventDeduplicator,
@ConfigProperty(defaultValue = "CONCURRENT CAPACITY(500) FLUSHABLE UNHANDLED_TASK_METRIC")
@ConfigProperty(defaultValue = "SEQUENTIAL CAPACITY(500) FLUSHABLE UNHANDLED_TASK_METRIC")
TaskSchedulerConfiguration eventSignatureValidator,
@ConfigProperty(defaultValue = "SEQUENTIAL CAPACITY(500) FLUSHABLE UNHANDLED_TASK_METRIC")
TaskSchedulerConfiguration orphanBuffer,
@ConfigProperty(
defaultValue =
"SEQUENTIAL_THREAD CAPACITY(500) FLUSHABLE SQUELCHABLE UNHANDLED_TASK_METRIC BUSY_FRACTION_METRIC")
TaskSchedulerConfiguration consensusEngine,
@ConfigProperty(defaultValue = "SEQUENTIAL CAPACITY(500) FLUSHABLE SQUELCHABLE UNHANDLED_TASK_METRIC")
@ConfigProperty(defaultValue = "SEQUENTIAL CAPACITY(5000) FLUSHABLE SQUELCHABLE UNHANDLED_TASK_METRIC")
TaskSchedulerConfiguration eventCreationManager,
@ConfigProperty(defaultValue = "DIRECT") TaskSchedulerConfiguration selfEventSigner,
@ConfigProperty(defaultValue = "SEQUENTIAL_THREAD CAPACITY(20) UNHANDLED_TASK_METRIC")
Expand Down Expand Up @@ -125,12 +125,12 @@ public record PlatformSchedulersConfig(
@ConfigProperty(defaultValue = "DIRECT_THREADSAFE") TaskSchedulerConfiguration transactionPool,
@ConfigProperty(defaultValue = "SEQUENTIAL CAPACITY(500) FLUSHABLE UNHANDLED_TASK_METRIC")
TaskSchedulerConfiguration gossip,
@ConfigProperty(defaultValue = "CONCURRENT CAPACITY(5000) UNHANDLED_TASK_METRIC")
@ConfigProperty(defaultValue = "CONCURRENT CAPACITY(-1) UNHANDLED_TASK_METRIC")
TaskSchedulerConfiguration eventHasher,
@ConfigProperty(defaultValue = "CONCURRENT CAPACITY(-1) UNHANDLED_TASK_METRIC")
TaskSchedulerConfiguration postHashCollector,
@ConfigProperty(defaultValue = "SEQUENTIAL CAPACITY(500) FLUSHABLE UNHANDLED_TASK_METRIC")
TaskSchedulerConfiguration branchDetector,
@ConfigProperty(defaultValue = "SEQUENTIAL CAPACITY(500) FLUSHABLE UNHANDLED_TASK_METRIC")
TaskSchedulerConfiguration branchReporter,
@ConfigProperty(defaultValue = "false") boolean hashCollectorEnabled) {}
@ConfigProperty(defaultValue = "true") boolean hashCollectorEnabled) {}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pcli diagram \
-s 'PcesWriter:durable event info:📝' \
-s 'HealthMonitor:health info:🏥' \
-g 'Orphan Buffer:OrphanBuffer,OrphanBufferSplitter' \
-g 'Event Intake:EventHasher,InternalEventValidator,EventDeduplicator,EventSignatureValidator,Orphan Buffer' \
-g 'Event Intake:EventHasher,InternalEventValidator,EventDeduplicator,EventSignatureValidator,Orphan Buffer,PostHashCollector' \
-g 'Consensus Engine:ConsensusEngine,ConsensusEngineSplitter,eventWindowManager,getKeystoneEventSequenceNumber,getConsensusEvents' \
-g 'State Snapshot Manager:saveToDiskFilter,StateSnapshotManager,extractOldestMinimumGenerationOnDisk,toStateWrittenToDiskAction,toNotification' \
-g 'State File Management:State Snapshot Manager,📀,💾' \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ void basicBehaviorTest() {
final long round;

if (tooOld) {
round = randotron.nextLong(1, currentRound - maxSignatureAge);
if (currentRound - maxSignatureAge > 1) {
round = randotron.nextLong(1, currentRound - maxSignatureAge);
} else {
round = 1;
}
} else {
round = randotron.nextLong(currentRound - maxSignatureAge, currentRound);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,6 @@ void statusPreventsCreation() {
assertSame(eventsToCreate.get(1), e1);
}

/**
* this type of back pressure is disabled now, delete this test when we commit to removing it permanently
*/
@Disabled
@Test
void backpressurePreventsCreation() {
final BaseEventHashedData e0 = manager.maybeCreateEvent();
Expand Down Expand Up @@ -164,6 +160,10 @@ void ratePreventsCreation() {
assertSame(eventsToCreate.get(1), e1);
}

/**
* This form of backpressure is not currently enabled.
*/
@Disabled
@Test
void unhealthyNodePreventsCreation() {
final BaseEventHashedData e0 = manager.maybeCreateEvent();
Expand Down

0 comments on commit e6cf2ad

Please sign in to comment.