lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject lucenenet git commit: BUG: Lucene.Net.Index (ConcurrentMergeScheduler + TaskMergeScheduler): Fixed null reference exception due to synchronization of list across threads.
Date Wed, 27 Sep 2017 19:15:59 GMT
Repository: lucenenet
Updated Branches:
  refs/heads/master 8866a3afd -> 66302b4f1


BUG: Lucene.Net.Index (ConcurrentMergeScheduler + TaskMergeScheduler): Fixed null reference
exception due to synchronization of list across threads.


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/66302b4f
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/66302b4f
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/66302b4f

Branch: refs/heads/master
Commit: 66302b4f1cf179ee6f167dbfc4b2a677e4ba59ff
Parents: 8866a3a
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Thu Sep 28 02:15:39 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Thu Sep 28 02:15:39 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Tests/Index/TestIndexWriterExceptions.cs | 2 +-
 src/Lucene.Net/Index/ConcurrentMergeScheduler.cs        | 2 +-
 src/Lucene.Net/Index/TaskMergeScheduler.cs              | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/66302b4f/src/Lucene.Net.Tests/Index/TestIndexWriterExceptions.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestIndexWriterExceptions.cs b/src/Lucene.Net.Tests/Index/TestIndexWriterExceptions.cs
index 615201a..09bc75a 100644
--- a/src/Lucene.Net.Tests/Index/TestIndexWriterExceptions.cs
+++ b/src/Lucene.Net.Tests/Index/TestIndexWriterExceptions.cs
@@ -2488,7 +2488,7 @@ namespace Lucene.Net.Index
         }
 
         private class ConcurrentMergeSchedulerAnonymousInnerClassHelper :
-#if NETSTANDARD1_5
+#if !FEATURE_CONCURRENTMERGESCHEDULER
             TaskMergeScheduler
 #else
             ConcurrentMergeScheduler

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/66302b4f/src/Lucene.Net/Index/ConcurrentMergeScheduler.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/ConcurrentMergeScheduler.cs b/src/Lucene.Net/Index/ConcurrentMergeScheduler.cs
index 6c3d525..289399d 100644
--- a/src/Lucene.Net/Index/ConcurrentMergeScheduler.cs
+++ b/src/Lucene.Net/Index/ConcurrentMergeScheduler.cs
@@ -352,7 +352,7 @@ namespace Lucene.Net.Index
                     {
                         foreach (MergeThread t in m_mergeThreads)
                         {
-                            if (t.IsAlive)
+                            if (t != null && t.IsAlive)
                             {
                                 toSync = t;
                                 break;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/66302b4f/src/Lucene.Net/Index/TaskMergeScheduler.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/TaskMergeScheduler.cs b/src/Lucene.Net/Index/TaskMergeScheduler.cs
index d6bc935..a446b3d 100644
--- a/src/Lucene.Net/Index/TaskMergeScheduler.cs
+++ b/src/Lucene.Net/Index/TaskMergeScheduler.cs
@@ -188,7 +188,7 @@ namespace Lucene.Net.Index
         {
             foreach (var merge in _mergeThreads.ToArray())
             {
-                if (!merge.IsAlive)
+                if (merge == null || !merge.IsAlive)
                 {
                     continue;
                 }


Mime
View raw message