Method GetSegmentsFile
GetSegmentsFile(IList<String>, Boolean)
Verifies that the last file is segments_N and fails otherwise. It also removes and returns the file from the list, because it needs to be handled last, after all files. This is important in order to guarantee that if a reader sees the new segments_N, all other segment files are already on stable storage.
The reason why the code fails instead of putting segments_N file last is that this indicates an error in the IRevision implementation.
Declaration
public static string GetSegmentsFile(IList<string> files, bool allowEmpty)
Parameters
Type | Name | Description |
---|---|---|
IList<System.String> | files | |
System.Boolean | allowEmpty |
Returns
Type | Description |
---|---|
System.String |