BUG: Lucene.Net.Util.OfflineSorter: Added line to delete the output file (that existed in Lucene).
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/ab75145b Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/ab75145b Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/ab75145b Branch: refs/heads/master Commit: ab75145b8969b475c19375fd2bcde9b66c125c36 Parents: 484f268 Author: Shad Storhaug <[email protected]> Authored: Thu Jun 22 01:33:24 2017 +0700 Committer: Shad Storhaug <[email protected]> Committed: Thu Jun 22 01:33:24 2017 +0700 ---------------------------------------------------------------------- src/Lucene.Net/Util/OfflineSorter.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucenenet/blob/ab75145b/src/Lucene.Net/Util/OfflineSorter.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net/Util/OfflineSorter.cs b/src/Lucene.Net/Util/OfflineSorter.cs index 91dc2c0..e7ccb95 100644 --- a/src/Lucene.Net/Util/OfflineSorter.cs +++ b/src/Lucene.Net/Util/OfflineSorter.cs @@ -251,9 +251,7 @@ namespace Lucene.Net.Util { sortInfo = new SortInfo(this) { TotalTime = Environment.TickCount }; - // LUCENENET NOTE: Can't do this because another thread could recreate the file before we are done here. - // and cause this to bomb. We use the existence of the file as an indicator that we are done using it. - //output.Delete(); // LUCENENET TODO: BUG: Put this back in (we now have thread-safe file creation, so this should be like the original). + output.Delete(); var merges = new List<FileInfo>(); bool success2 = false;
