Skip to content

Commit

Permalink
Adds notes
Browse files Browse the repository at this point in the history
  • Loading branch information
Shazwazza committed Mar 30, 2017
1 parent 1930176 commit 78b7bc5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Examine/LuceneEngine/Directories/SyncDirectory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class SyncDirectory : Lucene.Net.Store.Directory
private bool _inSync = false;
private readonly object _locker = new object();

private static readonly HashSet<string> RemoteOnly = new HashSet<string> {"segments.gen"};
internal static readonly HashSet<string> RemoteOnlyFiles = new HashSet<string> {"segments.gen"};


/// <summary>
Expand Down Expand Up @@ -264,7 +264,7 @@ public override IndexInput OpenInput(string name)
//generations approach. For example, the first segments file is segments_1, then segments_2, etc.
//The generation is a sequential long integer represented in alpha-numeric (base 36) form."

if (RemoteOnly.Contains(name))
if (RemoteOnlyFiles.Contains(name))
{
return _masterDirectory.OpenInput(name);
}
Expand Down
4 changes: 4 additions & 0 deletions src/Examine/LuceneEngine/Directories/SyncIndexInput.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ internal class SyncIndexInput : IndexInput
/// </summary>
/// <param name="directory"></param>
/// <param name="name"></param>
/// <remarks>
/// This will not work for the segments.gen file because it doesn't compare to master and segments.gen is not write-once!
/// Therefore do not use this class from a Directory instance for that file, see SyncDirectory.OpenInput
/// </remarks>
public SyncIndexInput(SyncDirectory directory, string name)
{
if (directory == null) throw new ArgumentNullException(nameof(directory));
Expand Down

0 comments on commit 78b7bc5

Please sign in to comment.