mirror of
https://github.com/ZoneTree/ZoneTree.git
synced 2026-10-29 21:39:22 +08:00
Merge pull request #59 from koculu/58-enhancement-support-bufferedfilestreamstrategy-that-is-fixed-on-net80
Fix LocalFileStream flush parameters.
This commit is contained in:
@@ -35,17 +35,12 @@ public sealed class LocalFileStream : Stream, IFileStream
|
||||
|
||||
public override void Flush()
|
||||
{
|
||||
// All flush operations are synced to the disk.
|
||||
// (no OS Kernel intermediate buffers remain after flush)
|
||||
// It is the best option.
|
||||
// Because it prevents unexpected file corruptions with little overhead.
|
||||
FileStream.Flush(true);
|
||||
FileStream.Flush();
|
||||
}
|
||||
|
||||
public void Flush(bool flushToDisk)
|
||||
{
|
||||
// All flush operations are synced to the disk.
|
||||
FileStream.Flush(true);
|
||||
FileStream.Flush(flushToDisk);
|
||||
}
|
||||
|
||||
public override int Read(byte[] buffer, int offset, int count)
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
<Authors>Ahmed Yasin Koculu</Authors>
|
||||
<PackageId>ZoneTree</PackageId>
|
||||
<Title>ZoneTree</Title>
|
||||
<ProductVersion>1.7.0.0</ProductVersion>
|
||||
<Version>1.7.0.0</Version>
|
||||
<ProductVersion>1.7.1.0</ProductVersion>
|
||||
<Version>1.7.1.0</Version>
|
||||
<Authors>Ahmed Yasin Koculu</Authors>
|
||||
<AssemblyTitle>ZoneTree</AssemblyTitle>
|
||||
<Description>ZoneTree is a persistent, high-performance, transactional, ACID-compliant ordered key-value database for NET. It can operate in memory or on local/cloud storage.</Description>
|
||||
|
||||
Reference in New Issue
Block a user