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

dgraph-io / badger / 1930
61%
main: 61%

Build:
Build:
LAST BUILD BRANCH: dependabot/github_actions/actions-eb8e6b6abe
DEFAULT BRANCH: main
Ran 02 May 2019 02:33PM CUT
Jobs 4
Files 31
Run time 3min
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

02 May 2019 02:25PM CUT coverage: 79.376% (+0.07%) from 79.304%
1930

push

travis-ci

jarifibrahim
<a href="https://github.com/dgraph-io/badger/commit/<a class=hub.com/dgraph-io/badger/commit/6b796b3ebec3ff006fcb1b425836cd784651e9fd">6b796b3eb<a href="https://github.com/dgraph-io/badger/commit/6b796b3ebec3ff006fcb1b425836cd784651e9fd">&quot;&gt;Set readTs in write batch to latest done readTs so that we can discard older versions of keys during compactions.

Every Transaction stores the latest value of `readTs` it is aware of. When the transaction is discarded (which happens even when we commit), the global value of `readMark` is updated.
https://github.com/dgraph-io/badger/blob/&lt;/a&gt;&lt;a class=&quot;double-link&quot; href=&quot;https://github.com/dgraph-io/badger/commit/&amp;lt;a class=&amp;quot;double-link&amp;quot; href=&amp;quot;https://git&quot;&gt;&amp;lt;a class=</a>hub.com/dgraph-io/badger/commit/&lt;a class=&quot;double-link&quot; href=&quot;https://git">&lt;a class=</a>hub.com/dgraph-io/badger/commit/<a class=hub.com/dgraph-io/badger/commit/<a class="double-link" href="https://git"><a class=hub.com/dgraph-io/badger/commit/1fcc96ecdb66d221df85cddec186b6ac7b6dab4b">1fcc96ecd">1fcc96ecd</a><a href="https://github.com/dgraph-io/badger/commit/6b796b3ebec3ff006fcb1b425836cd784651e9fd">/txn.go#L501-L503
Previously, the `readTs` of transaction inside the write batch struct was set to 0. So the global value of `readMark` would also be set to 0 (unless someone ran a transaction after using write batch).
Due to the 0 value of the global `readMark`, the compaction algorithm would skip all the values which were inserted in the write batch call.
See https://github.com/dgraph-io/badger/blob/1fcc96ecdb66d221df85cddec186b6ac7b6dab4b/levels.go#L480-L484
and
https://github.com/dgraph-io/badger/blob/1fcc96ecdb66d221df85cddec186b6ac7b6dab4b/txn.go#L138-L145
The `o.readMark.DoneUntil()` call would always return `0` and so the compaction wouldn&#39;t compact the newer values.

With this commit, the compaction algorithm works as expected with key-values inserted via Transaction API or via the Write Batch API.

See https://github.com/dgraph-io/badger/issues/767</a>

5138 of 6473 relevant lines covered (79.38%)

1304258.97 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1930.1 02 May 2019 02:33PM CUT 0
79.21
Travis Job 1930.1
2 1930.2 02 May 2019 02:34PM CUT 0
79.21
Travis Job 1930.2
3 1930.3 02 May 2019 02:35PM CUT 0
79.13
Travis Job 1930.3
4 1930.4 02 May 2019 02:36PM CUT 0
79.14
Travis Job 1930.4
Source Files on build 1930
  • List 0
  • Changed 21
  • Source Changed 1
  • Coverage Changed 21
Loading...
Coverage∆FileLinesRelevantCoveredMissedHits/Line
No data available in table
Showing 0 to 0 of 0 entries
  • Previous
  • Next
  • Back to Repo
  • Travis Build #1930
  • 6b796b3e on github
  • Prev Build on master (#1929)
  • Next Build on master (#1937)
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

© 2025 Coveralls, Inc