From 0465a2cfe0c6b49c410660f76421949121d35657 Mon Sep 17 00:00:00 2001 From: sakno Date: Wed, 29 May 2024 22:28:35 +0300 Subject: [PATCH] Code cleanup --- .../Net/Cluster/Consensus/Raft/MemoryBasedStateMachine.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cluster/DotNext.Net.Cluster/Net/Cluster/Consensus/Raft/MemoryBasedStateMachine.cs b/src/cluster/DotNext.Net.Cluster/Net/Cluster/Consensus/Raft/MemoryBasedStateMachine.cs index 9e027e236..32c0d1639 100644 --- a/src/cluster/DotNext.Net.Cluster/Net/Cluster/Consensus/Raft/MemoryBasedStateMachine.cs +++ b/src/cluster/DotNext.Net.Cluster/Net/Cluster/Consensus/Raft/MemoryBasedStateMachine.cs @@ -679,7 +679,7 @@ long ComputeUpperBoundIndex(long count) protected abstract ValueTask ApplyAsync(LogEntry entry); private ValueTask ApplyCoreAsync(LogEntry entry) - => entry.IsEmpty ? new() : ApplyAsync(entry); // skip empty log entry + => entry.IsEmpty ? ValueTask.CompletedTask : ApplyAsync(entry); // skip empty log entry [AsyncMethodBuilder(typeof(PoolingAsyncValueTaskMethodBuilder))] private async ValueTask ApplyAsync(int sessionId, long startIndex, CancellationToken token)