Skip to content

Commit e6cf2ad

Browse files
authored
chore: disabled new backpressure via settings (#13646)
Signed-off-by: Cody Littley <[email protected]>
1 parent cfde66d commit e6cf2ad

File tree

10 files changed

+24
-20
lines changed

10 files changed

+24
-20
lines changed

platform-sdk/docs/core/wiring-diagram.svg

Lines changed: 1 addition & 1 deletion
Loading

platform-sdk/swirlds-common/src/main/java/com/swirlds/common/wiring/WiringConfig.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
*/
4242
@ConfigData("platform.wiring")
4343
public record WiringConfig(
44-
@ConfigProperty(defaultValue = "true") boolean healthMonitorEnabled,
45-
@ConfigProperty(defaultValue = "false") boolean hardBackpressureEnabled,
44+
@ConfigProperty(defaultValue = "false") boolean healthMonitorEnabled,
45+
@ConfigProperty(defaultValue = "true") boolean hardBackpressureEnabled,
4646
@ConfigProperty(defaultValue = "1.0") double defaultPoolMultiplier,
4747
@ConfigProperty(defaultValue = "0") int defaultPoolConstant,
4848
@ConfigProperty(defaultValue = "500") int healthMonitorSchedulerCapacity,

platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/consensus/ConsensusConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@
3636
@ConfigData("consensus")
3737
public record ConsensusConfig(
3838
@ConfigProperty(defaultValue = "26") int roundsNonAncient,
39-
@ConfigProperty(defaultValue = "2000") int roundsExpired,
39+
@ConfigProperty(defaultValue = "500") int roundsExpired,
4040
@ConfigProperty(defaultValue = "12") int coinFreq) {}

platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/event/creation/EventCreationConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,5 @@ public record EventCreationConfig(
5454
@ConfigProperty(defaultValue = "10") double antiSelfishnessFactor,
5555
@ConfigProperty(defaultValue = "10") int tipsetSnapshotHistorySize,
5656
@ConfigProperty(defaultValue = "1024") int eventIntakeThrottle,
57-
@ConfigProperty(defaultValue = "false") boolean useLegacyBackpressure,
57+
@ConfigProperty(defaultValue = "true") boolean useLegacyBackpressure,
5858
@ConfigProperty(defaultValue = "5s") Duration maximumPermissibleUnhealthyDuration) {}

platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/eventhandling/EventConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public record EventConfig(
4444
@ConfigProperty(defaultValue = "/opt/hgcapp/eventsStreams") String eventsLogDir,
4545
@ConfigProperty(defaultValue = "true") boolean enableEventStreaming,
4646
@ConfigProperty(defaultValue = "false") boolean useBirthRoundAncientThreshold,
47-
@ConfigProperty(defaultValue = "false") boolean useOldStyleIntakeQueue) {
47+
@ConfigProperty(defaultValue = "true") boolean useOldStyleIntakeQueue) {
4848

4949
/**
5050
* @return the {@link AncientMode} based on useBirthRoundAncientThreshold

platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/gossip/sync/config/SyncConfig.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@
5555
public record SyncConfig(
5656
@ConfigProperty(defaultValue = "25") int syncSleepAfterFailedNegotiation,
5757
@ConfigProperty(defaultValue = "17") int syncProtocolPermitCount,
58-
@ConfigProperty(defaultValue = "true") boolean onePermitPerPeer,
58+
@ConfigProperty(defaultValue = "false") boolean onePermitPerPeer,
5959
@ConfigProperty(defaultValue = "1000") int syncProtocolHeartbeatPeriod,
6060
@ConfigProperty(defaultValue = "true") boolean waitForEventsInIntake,
6161
@ConfigProperty(defaultValue = "true") boolean filterLikelyDuplicates,
6262
@ConfigProperty(defaultValue = "3s") Duration nonAncestorFilterThreshold,
6363
@ConfigProperty(defaultValue = "500ms") Duration syncKeepalivePeriod,
6464
@ConfigProperty(defaultValue = "1m") Duration maxSyncTime,
65-
@ConfigProperty(defaultValue = "5000") int maxSyncEventCount,
65+
@ConfigProperty(defaultValue = "0") int maxSyncEventCount,
6666
@ConfigProperty(defaultValue = "5s") Duration unhealthyGracePeriod,
6767
@ConfigProperty(defaultValue = "5") double permitsRevokedPerSecond,
6868
@ConfigProperty(defaultValue = "0.1") double permitsReturnedPerSecond,

platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/wiring/PlatformSchedulersConfig.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,19 +65,19 @@
6565
@ConfigData("platformSchedulers")
6666
public record PlatformSchedulersConfig(
6767
@ConfigProperty(defaultValue = "500") int eventHasherUnhandledCapacity,
68-
@ConfigProperty(defaultValue = "CONCURRENT CAPACITY(5000) FLUSHABLE UNHANDLED_TASK_METRIC")
68+
@ConfigProperty(defaultValue = "SEQUENTIAL CAPACITY(500) FLUSHABLE UNHANDLED_TASK_METRIC")
6969
TaskSchedulerConfiguration internalEventValidator,
70-
@ConfigProperty(defaultValue = "SEQUENTIAL CAPACITY(5000) FLUSHABLE UNHANDLED_TASK_METRIC")
70+
@ConfigProperty(defaultValue = "SEQUENTIAL CAPACITY(500) FLUSHABLE UNHANDLED_TASK_METRIC")
7171
TaskSchedulerConfiguration eventDeduplicator,
72-
@ConfigProperty(defaultValue = "CONCURRENT CAPACITY(500) FLUSHABLE UNHANDLED_TASK_METRIC")
72+
@ConfigProperty(defaultValue = "SEQUENTIAL CAPACITY(500) FLUSHABLE UNHANDLED_TASK_METRIC")
7373
TaskSchedulerConfiguration eventSignatureValidator,
7474
@ConfigProperty(defaultValue = "SEQUENTIAL CAPACITY(500) FLUSHABLE UNHANDLED_TASK_METRIC")
7575
TaskSchedulerConfiguration orphanBuffer,
7676
@ConfigProperty(
7777
defaultValue =
7878
"SEQUENTIAL_THREAD CAPACITY(500) FLUSHABLE SQUELCHABLE UNHANDLED_TASK_METRIC BUSY_FRACTION_METRIC")
7979
TaskSchedulerConfiguration consensusEngine,
80-
@ConfigProperty(defaultValue = "SEQUENTIAL CAPACITY(500) FLUSHABLE SQUELCHABLE UNHANDLED_TASK_METRIC")
80+
@ConfigProperty(defaultValue = "SEQUENTIAL CAPACITY(5000) FLUSHABLE SQUELCHABLE UNHANDLED_TASK_METRIC")
8181
TaskSchedulerConfiguration eventCreationManager,
8282
@ConfigProperty(defaultValue = "DIRECT") TaskSchedulerConfiguration selfEventSigner,
8383
@ConfigProperty(defaultValue = "SEQUENTIAL_THREAD CAPACITY(20) UNHANDLED_TASK_METRIC")
@@ -125,12 +125,12 @@ public record PlatformSchedulersConfig(
125125
@ConfigProperty(defaultValue = "DIRECT_THREADSAFE") TaskSchedulerConfiguration transactionPool,
126126
@ConfigProperty(defaultValue = "SEQUENTIAL CAPACITY(500) FLUSHABLE UNHANDLED_TASK_METRIC")
127127
TaskSchedulerConfiguration gossip,
128-
@ConfigProperty(defaultValue = "CONCURRENT CAPACITY(5000) UNHANDLED_TASK_METRIC")
128+
@ConfigProperty(defaultValue = "CONCURRENT CAPACITY(-1) UNHANDLED_TASK_METRIC")
129129
TaskSchedulerConfiguration eventHasher,
130130
@ConfigProperty(defaultValue = "CONCURRENT CAPACITY(-1) UNHANDLED_TASK_METRIC")
131131
TaskSchedulerConfiguration postHashCollector,
132132
@ConfigProperty(defaultValue = "SEQUENTIAL CAPACITY(500) FLUSHABLE UNHANDLED_TASK_METRIC")
133133
TaskSchedulerConfiguration branchDetector,
134134
@ConfigProperty(defaultValue = "SEQUENTIAL CAPACITY(500) FLUSHABLE UNHANDLED_TASK_METRIC")
135135
TaskSchedulerConfiguration branchReporter,
136-
@ConfigProperty(defaultValue = "false") boolean hashCollectorEnabled) {}
136+
@ConfigProperty(defaultValue = "true") boolean hashCollectorEnabled) {}

platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/wiring/generate-platform-diagram.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ pcli diagram \
3535
-s 'PcesWriter:durable event info:📝' \
3636
-s 'HealthMonitor:health info:🏥' \
3737
-g 'Orphan Buffer:OrphanBuffer,OrphanBufferSplitter' \
38-
-g 'Event Intake:EventHasher,InternalEventValidator,EventDeduplicator,EventSignatureValidator,Orphan Buffer' \
38+
-g 'Event Intake:EventHasher,InternalEventValidator,EventDeduplicator,EventSignatureValidator,Orphan Buffer,PostHashCollector' \
3939
-g 'Consensus Engine:ConsensusEngine,ConsensusEngineSplitter,eventWindowManager,getKeystoneEventSequenceNumber,getConsensusEvents' \
4040
-g 'State Snapshot Manager:saveToDiskFilter,StateSnapshotManager,extractOldestMinimumGenerationOnDisk,toStateWrittenToDiskAction,toNotification' \
4141
-g 'State File Management:State Snapshot Manager,📀,💾' \

platform-sdk/swirlds-platform-core/src/test/java/com/swirlds/platform/event/stale/TransactionResubmitterTests.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,11 @@ void basicBehaviorTest() {
7878
final long round;
7979

8080
if (tooOld) {
81-
round = randotron.nextLong(1, currentRound - maxSignatureAge);
81+
if (currentRound - maxSignatureAge > 1) {
82+
round = randotron.nextLong(1, currentRound - maxSignatureAge);
83+
} else {
84+
round = 1;
85+
}
8286
} else {
8387
round = randotron.nextLong(currentRound - maxSignatureAge, currentRound);
8488
}

platform-sdk/swirlds-unit-tests/core/swirlds-platform-test/src/test/java/com/swirlds/platform/test/event/tipset/EventCreationManagerTests.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,6 @@ void statusPreventsCreation() {
117117
assertSame(eventsToCreate.get(1), e1);
118118
}
119119

120-
/**
121-
* this type of back pressure is disabled now, delete this test when we commit to removing it permanently
122-
*/
123-
@Disabled
124120
@Test
125121
void backpressurePreventsCreation() {
126122
final BaseEventHashedData e0 = manager.maybeCreateEvent();
@@ -164,6 +160,10 @@ void ratePreventsCreation() {
164160
assertSame(eventsToCreate.get(1), e1);
165161
}
166162

163+
/**
164+
* This form of backpressure is not currently enabled.
165+
*/
166+
@Disabled
167167
@Test
168168
void unhealthyNodePreventsCreation() {
169169
final BaseEventHashedData e0 = manager.maybeCreateEvent();

0 commit comments

Comments
 (0)