Skip to content

Commit

Permalink
fix NPE on commit path when the last persistent iterator is removed (#…
Browse files Browse the repository at this point in the history
…772)

Co-authored-by: Badrish Chandramouli <badrishc@microsoft.com>
  • Loading branch information
tli2 and badrishc authored Dec 8, 2022
1 parent 37a6906 commit 4f0b2d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cs/src/core/FasterLog/FasterLog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1771,7 +1771,7 @@ private bool IteratorsChanged(ref FasterLogRecoveryInfo info)
{
return info.Iterators != null && info.Iterators.Count != 0;
}
if (_lastPersistedIterators.Count != info.Iterators.Count)
if (info.Iterators == null || _lastPersistedIterators.Count != info.Iterators.Count)
return true;
foreach (var item in _lastPersistedIterators)
{
Expand Down

0 comments on commit 4f0b2d3

Please sign in to comment.