lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aro...@apache.org
Subject svn commit: r418807 - in /incubator/lucene.net/trunk/C#/src/Lucene.Net: Index/IndexReader.cs Index/IndexWriter.cs Index/SegmentReader.cs Index/TermInfosReader.cs Store/Lock.cs Store/RAMDirectory.cs
Date Mon, 03 Jul 2006 17:00:06 GMT
Author: aroush
Date: Mon Jul  3 10:00:05 2006
New Revision: 418807

URL: http://svn.apache.org/viewvc?rev=418807&view=rev
Log:
1) Changed obtain() to Obtain()
2) Don't call SetData(null) on the thread.

Modified:
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/IndexReader.cs
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/IndexWriter.cs
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/SegmentReader.cs
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/TermInfosReader.cs
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Store/Lock.cs
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Store/RAMDirectory.cs

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/IndexReader.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Index/IndexReader.cs?rev=418807&r1=418806&r2=418807&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/IndexReader.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/IndexReader.cs Mon Jul  3 10:00:05
2006
@@ -554,7 +554,7 @@
 			if (this.writeLock == null)
 			{
 				Lock writeLock = directory.MakeLock(IndexWriter.WRITE_LOCK_NAME);
-				if (!writeLock.obtain(IndexWriter.WRITE_LOCK_TIMEOUT))
+				if (!writeLock.Obtain(IndexWriter.WRITE_LOCK_TIMEOUT))
 				// obtain write lock
 				{
 					throw new System.IO.IOException("Index locked for write: " + writeLock);
@@ -598,7 +598,6 @@
 		/// reflected in the {@link #docFreq} statistic, though
 		/// this will be corrected eventually as the index is further modified.
 		/// </summary>
-		//UPGRADE_NOTE: Synchronized keyword was removed from method 'DeleteDocument'. Lock expression
was added. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1027'"
 		public void  DeleteDocument(int docNum)
 		{
 			lock (this)

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/IndexWriter.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Index/IndexWriter.cs?rev=418807&r1=418806&r2=418807&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/IndexWriter.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/IndexWriter.cs Mon Jul  3 10:00:05
2006
@@ -404,7 +404,7 @@
 			analyzer = a;
 			
 			Lock writeLock = directory.MakeLock(IndexWriter.WRITE_LOCK_NAME);
-			if (!writeLock.obtain(WRITE_LOCK_TIMEOUT))
+			if (!writeLock.Obtain(WRITE_LOCK_TIMEOUT))
 			// obtain write lock
 			{
 				throw new System.IO.IOException("Index locked for write: " + writeLock);

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/SegmentReader.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Index/SegmentReader.cs?rev=418807&r1=418806&r2=418807&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/SegmentReader.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/SegmentReader.cs Mon Jul  3 10:00:05
2006
@@ -180,7 +180,7 @@
 		~SegmentReader()
 		{
 			// patch for pre-1.4.2 JVMs, whose ThreadLocals leak
-			System.Threading.Thread.SetData(termVectorsLocal, null);
+			//System.Threading.Thread.SetData(termVectorsLocal, null);
 		}
 		
 		protected internal override void  DoCommit()

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/TermInfosReader.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Index/TermInfosReader.cs?rev=418807&r1=418806&r2=418807&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/TermInfosReader.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/TermInfosReader.cs Mon Jul  3 10:00:05
2006
@@ -55,14 +55,8 @@
 		
 		~TermInfosReader()
 		{
-            try
-            {
-                // patch for pre-1.4.2 JVMs, whose ThreadLocals leak
-                System.Threading.Thread.SetData(enumerators, null);     // {{Aroush-1.9}}
is this required for .NET ?!
-            }
-            catch (Exception)
-            {
-            }
+            // patch for pre-1.4.2 JVMs, whose ThreadLocals leak
+            //System.Threading.Thread.SetData(enumerators, null);
 		}
 		
 		public int GetSkipInterval()

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Store/Lock.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Store/Lock.cs?rev=418807&r1=418806&r2=418807&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Store/Lock.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Store/Lock.cs Mon Jul  3 10:00:05 2006
@@ -56,7 +56,7 @@
 		/// <returns> true if lock was obtained
 		/// </returns>
 		/// <throws>  IOException if lock wait times out or obtain() throws an IOException
</throws>
-		public virtual bool obtain(long lockWaitTimeout)
+		public virtual bool Obtain(long lockWaitTimeout)
 		{
 			bool locked = Obtain();
 			int maxSleepCount = (int) (lockWaitTimeout / LOCK_POLL_INTERVAL);
@@ -124,7 +124,7 @@
 				bool locked = false;
 				try
 				{
-					locked = lock_Renamed.obtain(lockWaitTimeout);
+					locked = lock_Renamed.Obtain(lockWaitTimeout);
 					return DoBody();
 				}
 				finally

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Store/RAMDirectory.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Store/RAMDirectory.cs?rev=418807&r1=418806&r2=418807&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Store/RAMDirectory.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Store/RAMDirectory.cs Mon Jul  3 10:00:05
2006
@@ -105,7 +105,7 @@
 				int readCount = 0;
 				while (readCount < len)
 				{
-					int toRead = readCount + BufferedIndexOutput.BUFFER_SIZE > len?len - readCount:BufferedIndexOutput.BUFFER_SIZE;
+					int toRead = readCount + BufferedIndexOutput.BUFFER_SIZE > len?len - readCount :
BufferedIndexOutput.BUFFER_SIZE;
 					is_Renamed.ReadBytes(buf, 0, toRead);
 					os.WriteBytes(buf, toRead);
 					readCount += toRead;



Mime
View raw message