Skip to content

Commit

Permalink
Releasing v0.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ecton committed May 3, 2022
1 parent 3718ffb commit 9b59853
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,35 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## v0.5.3

- File operations are now fully persisted to disk to the best ability provided
by each operating system. @justinj discovered that no `fsync()` operations
were happening, and reported the finding. Nebari's TreeFile was using
`File::flush()` instead of `File::sync_data()/sync_all()`. This means that it
would be possible for an OS-level buffer to not be flushed to disk before
Nebari reported a successful write.

Interestingly, this change has no noticable impact on performance on Linux.
However, on Mac OS, `File::sync_data()` performs a `fcntl` with `F_FULLFSYNC`,
which has a significant impact on performance. This is the correct behavior,
however, as without this level of guarantee, sudden power loss could result in
data loss.

Many people argue that using `F_BARRIERFSYNC` is sufficient for most people,
but Apple's [own documentation][apple-reducing-disk-writes] states this is
necessary:

> Only use F_FULLFSYNC when your app requires a strong expectation of data
> persistence. Note that F_FULLFSYNC represents a best-effort guarantee that
> iOS writes data to the disk, but data can still be lost in the case of
> sudden power loss.
For now, the stance of Nebari's authors is that `F_FULLFSYNC` is the proper
way to implement true ACID-compliance.

[reducing-disk-writes]: https://developer.apple.com/documentation/xcode/reducing-disk-writes#Minimize-Explicit-Storage-Synchronization

## v0.5.2

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion nebari/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "nebari"
version = "0.5.2"
version = "0.5.3"
edition = "2021"
description = "ACID-compliant database storage implementation using an append-only file format."
repository = "https://github.com/khonsulabs/nebari"
Expand Down

0 comments on commit 9b59853

Please sign in to comment.