Skip to content

Commit 8577e89

Browse files
Enable async IO by default (#6222)
1 parent 4e4e921 commit 8577e89

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ For information on changes in released versions of Teku, see the [releases page]
2121
- The `--initial-state` and `--eth1-deposit-contract-address` options has been removed from the `validator-client` subcommand. They have been ignored for some time but are now completely removed.
2222

2323
### Additions and Improvements
24+
- Enables asynchronous database updates by default. This ensures slow disk access or LevelDB compactions don't cause delays in the beacon node.
2425
- Make Validator Client connect to a failover event stream (if failovers are configured) when the current Beacon Node is not synced
2526
- Detect Lodestar clients in `libp2p_connected_peers_current` metrics
2627
- Reduce CPU and Memory consumption in shuffling, which will improve epoch transition performance

storage/src/main/java/tech/pegasys/teku/storage/store/StoreConfig.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public class StoreConfig {
2525
public static final int DEFAULT_BLOCK_CACHE_SIZE = 32;
2626
public static final int DEFAULT_CHECKPOINT_STATE_CACHE_SIZE = 20;
2727
public static final int DEFAULT_HOT_STATE_PERSISTENCE_FREQUENCY_IN_EPOCHS = 2;
28-
public static final boolean DEFAULT_ASYNC_STORAGE_ENABLED = false;
28+
public static final boolean DEFAULT_ASYNC_STORAGE_ENABLED = true;
2929

3030
private final int stateCacheSize;
3131
private final int blockCacheSize;

storage/src/test/java/tech/pegasys/teku/storage/server/kvstore/DatabaseTest.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ public void setup() throws IOException {
128128

129129
private void initialize(final DatabaseContext context, final StateStorageMode storageMode)
130130
throws IOException {
131-
createStorageSystem(context, storageMode, StoreConfig.createDefault(), false);
131+
final StoreConfig config = StoreConfig.builder().asyncStorageEnabled(false).build();
132+
createStorageSystem(context, storageMode, config, false);
132133

133134
// Initialize genesis store
134135
initGenesis();

storage/src/test/java/tech/pegasys/teku/storage/store/StoreTest.java

+6-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,12 @@ public void retrieveFinalizedCheckpointAndState() {
251251
}
252252

253253
public void testApplyChangesWhenTransactionCommits(final boolean withInterleavedTransaction) {
254-
final UpdatableStore store = createGenesisStore();
254+
final StoreConfig configWithAsyncIoDisabled =
255+
StoreConfig.builder().asyncStorageEnabled(false).build();
256+
final UpdatableStore store =
257+
withInterleavedTransaction
258+
? createGenesisStore(configWithAsyncIoDisabled)
259+
: createGenesisStore();
255260
final UInt64 epoch3 = UInt64.valueOf(4);
256261
final UInt64 epoch3Slot = spec.computeStartSlotAtEpoch(epoch3);
257262
chainBuilder.generateBlocksUpToSlot(epoch3Slot);

0 commit comments

Comments
 (0)