Skip to content

Commit

Permalink
Merge pull request #59 from koculu/58-enhancement-support-bufferedfil…
Browse files Browse the repository at this point in the history
…estreamstrategy-that-is-fixed-on-net80

Fix LocalFileStream flush parameters.
  • Loading branch information
koculu committed Jun 14, 2024
2 parents 7b331a8 + 96d0a26 commit 60dcda5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
9 changes: 2 additions & 7 deletions src/ZoneTree/AbstractFileStream/LocalFileStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,12 @@ public override long Position

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)
Expand Down
4 changes: 2 additions & 2 deletions src/ZoneTree/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 60dcda5

Please sign in to comment.