-
Notifications
You must be signed in to change notification settings - Fork 569
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[C#] Add StorageDeviceBase.OmitSegmentIdFromFilename #824
Conversation
…for implementors)
@@ -53,7 +53,7 @@ public TieredStorageDevice(int commitPoint, params IDevice[] devices) : this(com | |||
{ | |||
} | |||
|
|||
public override void Initialize(long segmentSize, LightEpoch epoch) | |||
public override void Initialize(long segmentSize, LightEpoch epoch, bool omitSegmentIdFromFileName = false) | |||
{ | |||
base.Initialize(segmentSize, epoch); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
call base with omitSegmentIdFromFileName
/// </summary> | ||
/// <param name="segmentSize"></param> | ||
/// <param name="epoch"></param> | ||
public override void Initialize(long segmentSize, LightEpoch epoch) | ||
/// <param name="omitSegmentIdFromFileName"></param> | ||
public override void Initialize(long segmentSize, LightEpoch epoch, bool omitSegmentIdFromFileName = false) | ||
{ | ||
base.Initialize(segmentSize, epoch); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Call base.Initialize with omitSegmentIdFromFileName
cs/test/TestUtils.cs
Outdated
@@ -138,19 +138,20 @@ internal static IDevice CreateTestDevice(DeviceType testDeviceType, string filen | |||
#if NETSTANDARD || NET | |||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) // avoids CA1416 // Validate platform compatibility | |||
#endif | |||
device = new LocalStorageDevice(filename, preallocateFile, deleteOnClose, disableFileBuffering, capacity, recoverDevice, useIoCompletionPort); | |||
device = new LocalStorageDevice(filename, preallocateFile, deleteOnClose, disableFileBuffering, capacity, recoverDevice, useIoCompletionPort, omitSegmentIdFromFilename: omitSegmentIdFromFilename); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is omitSegmentIdFromFileName is both constructor and Initialize? which one take precedence if they put true in contructor and omit (default false) in the Initialize.
No description provided.