You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by sy...@apache.org on 2015/01/28 12:11:51 UTC

[2/2] lucenenet git commit: We don't need a lock here

We don't need a lock here


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

Branch: refs/heads/master
Commit: 67af7e4e92937a7bb0aa13aab7599902cc14a5a3
Parents: 4513c52
Author: Itamar Syn-Hershko <it...@code972.com>
Authored: Wed Jan 28 13:11:09 2015 +0200
Committer: Itamar Syn-Hershko <it...@code972.com>
Committed: Wed Jan 28 13:11:34 2015 +0200

----------------------------------------------------------------------
 src/Lucene.Net.Core/Search/CachingWrapperFilter.cs | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/67af7e4e/src/Lucene.Net.Core/Search/CachingWrapperFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/CachingWrapperFilter.cs b/src/Lucene.Net.Core/Search/CachingWrapperFilter.cs
index 242225a..1399499 100644
--- a/src/Lucene.Net.Core/Search/CachingWrapperFilter.cs
+++ b/src/Lucene.Net.Core/Search/CachingWrapperFilter.cs
@@ -180,13 +180,9 @@ namespace Lucene.Net.Search
         /// <summary>
         /// Returns total byte size used by cached filters. </summary>
         public virtual long SizeInBytes()
-        {
-            // Sync only to pull the current set of values:
-            lock (_cache)
-            {
-                IList<DocIdSet> docIdSets = new List<DocIdSet>(_cache.Values);
-                return docIdSets.Sum(dis => RamUsageEstimator.SizeOf(dis));
-            }
+        {            
+            IList<DocIdSet> docIdSets = new List<DocIdSet>(_cache.Values);
+            return docIdSets.Sum(dis => RamUsageEstimator.SizeOf(dis));
         }
     }
 }
\ No newline at end of file