File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -671,6 +671,8 @@ private long GetActiveConnectionCount()
671671
672672 /// <summary>
673673 /// Persists data during shutdown using AOF or checkpoint based on configuration.
674+ /// Both Enabled AOF and checkpoint, but AOF is prioritized.
675+ /// IF AOF commit failed, checkpoint will be performed.
674676 /// </summary>
675677 private async Task FinalizeDataAsync ( CancellationToken token )
676678 {
@@ -683,6 +685,7 @@ private async Task FinalizeDataAsync(CancellationToken token)
683685 if ( commitSuccess )
684686 {
685687 logger ? . LogDebug ( "AOF committed successfully." ) ;
688+ return ; // skip checkpoint
686689 }
687690 else
688691 {
@@ -693,8 +696,6 @@ private async Task FinalizeDataAsync(CancellationToken token)
693696 {
694697 logger ? . LogError ( ex , "Error committing AOF during shutdown" ) ;
695698 }
696-
697- return ;
698699 }
699700
700701 if ( ! opts . EnableStorageTier )
@@ -717,6 +718,7 @@ private async Task FinalizeDataAsync(CancellationToken token)
717718 {
718719 logger ? . LogError ( ex , "Error taking checkpoint during shutdown" ) ;
719720 }
721+ return ;
720722 }
721723
722724 /// <summary>
You can’t perform that action at this time.
0 commit comments