Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Check if the read lock is held before exiting.
  • Loading branch information
huyhu committed Apr 17, 2020
1 parent 20f4627 commit e8af9d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion LiteDB.Tests/Engine/ParallelQuery_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace LiteDB.Tests.Engine
{
public class ParallelQuery_Tests
{
[Fact(Skip = "Must fix parallel query fetch")]
[Fact]
public void Query_Parallel()
{
using(var db = new LiteDatabase(new MemoryStream()))
Expand Down
3 changes: 2 additions & 1 deletion LiteDB/Engine/Services/LockService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ public void ExitTransaction()
// if current thread are in reserved mode, do not exit transaction (will be exit from ExitExclusive)
if (_transaction.IsWriteLockHeld) return;

_transaction.ExitReadLock();
if (_transaction.IsReadLockHeld)
_transaction.ExitReadLock();
}

/// <summary>
Expand Down

0 comments on commit e8af9d4

Please sign in to comment.