lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Digy (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENENET-135) Race condition in DocumentsWriter.UpdateDocument
Date Sat, 19 Jul 2008 18:27:31 GMT

    [ https://issues.apache.org/jira/browse/LUCENENET-135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12615034#action_12615034
] 

Digy commented on LUCENENET-135:
--------------------------------

Same bug also exists in ConcurrentMergeScheduler(Sync) which causes TestAddIndexOnDiskFull

{code}

public virtual void  Sync()
{
	lock (this) //<-------
	{
		while (MergeThreadCount() > 0)
		{
			Message("now wait for threads; currently " + mergeThreads.Count + " still running");
			int count = mergeThreads.Count;
			for (int i = 0; i < count; i++)
				Message("    " + i + ": " + ((MergeThread) mergeThreads[i]));
				
			try
			{
				System.Threading.Monitor.Wait(this); //<-------
			}
			catch (System.Threading.ThreadInterruptedException)
			{
			}
		}
	}
}
{code}

> Race condition in DocumentsWriter.UpdateDocument
> ------------------------------------------------
>
>                 Key: LUCENENET-135
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-135
>             Project: Lucene.Net
>          Issue Type: Bug
>         Environment: 2.3.1
>            Reporter: Digy
>         Attachments: DocumentsWriter-Temp.patch
>
>
> There is a race condition in DocumentsWriter.UpdateDocument. Locking the whole method
solves the problem but this is not what  is intended in java version
> (testcase:  Index/TestIndexWriter/TestDocumentsWriterExceptionThreads)
> I am working on it.
> DIGY

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message