• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

couchbase / moss / 97
83%

Build:
DEFAULT BRANCH: master
Ran 07 Sep 2016 10:50PM UTC
Jobs 1
Files 18
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
97

push

travis-ci

steveyen
MB-20494 - optional mossStore StorePersistOptions.NoSync flag

When an application calls Store.Persist() with
StorePersistOptions.NoSync of false (the default), then both before
and after the bytes of a file-footer have been written/appended to the
end of a moss store file, mossStore will invoke the file's Sync()
method.  This helps ensure that all the bytes of the file (including
key-val segments), up to and including the last written file-footer,
have been fsync'ed to disk.

In contrast, for the case when StorePersistOptions.NoSync is true
(e.g., skip the fsync), then mossStore's append-only approach *might*
seem like it's safe.  After all, previously written/appended bytes in
the file are never mutated by mossStore.

However, potential filesystem reordering of written blocks might
affect which bytes are physically written down to disk first.

Imagine, for example, if the filesystem chooses to write the blocks of
a file-footer first, before writing out any key-val segment data.
Then, imagine there's a power loss and server restart.  On reopening
the file, mossStore will encounter a valid file-footer, but that
file-footer is referring to file positions of data that have not
actually been written yet.

Using StorePersistOptions.NoSync of false avoids that corruption case.

Change-Id: I12ce33395
Reviewed-on: http://review.couchbase.org/67449
Reviewed-by: Marty Schoch <marty.schoch@gmail.com>
Tested-by: Steve Yen <steve.yen@gmail.com>

1976 of 2306 relevant lines covered (85.69%)

10713.8 hits per line

Jobs
ID Job ID Ran Files Coverage
1 97.1 07 Sep 2016 10:50PM UTC 0
85.69
Travis Job 97.1
Source Files on build 97
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #97
  • 96751433 on github
  • Prev Build on master (#96)
  • Next Build on master (#98)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc