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

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

Build:
Build:
LAST BUILD BRANCH: dependabot/github_actions/actions-eb8e6b6abe
DEFAULT BRANCH: main
Ran 08 Jan 2020 12:39PM UTC
Jobs 4
Files 369
Run time 18min
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

08 Jan 2020 12:25PM UTC coverage: 69.638% (-0.3%) from 69.94%
3533

push

travis-ci

web-flow
Remove the 'this entry should've caught' log from value.go (#1170)

Fixes - https://github.com/dgraph-io/badger/issues/1031
(There wasn't a bug to fix. The log statement shouldn't have been there)

This PR removes the warning message `WARNING: This entry should have
been caught.`. The warning message assumed that we will always find the
**newest key if two keys have the same version** This assumption is
valid in case of a normal key but it's **NOT TRUE** in case of
**move keys**.

Here's how we can end up fetching the older version of a move key if
two move keys have the same version.

```
It might be possible that the entry read from LSM Tree points to an
older vlog file. This can happen in the following situation. Assume DB
is opened with numberOfVersionsToKeep=1

Now, if we have ONLY one key in the system "FOO" which has been updated
3 times and the same key has been garbage collected 3 times, we'll have
3 versions of the movekey for the same key "FOO".
NOTE: moveKeyi is the moveKey with version i
Assume we have 3 move keys in L0.
- moveKey1 (points to vlog file 10),
- moveKey2 (points to vlog file 14) and
- moveKey3 (points to vlog file 15).

Also, assume there is another move key "moveKey1" (points to vlog
file 6) (this is also a move Key for key "FOO" ) on upper levels (let's
say level 3). The move key "moveKey1" on level 0 was inserted because
vlog file 6 was GCed.

Here's what the arrangement looks like
L0 => (moveKey1 => vlog10), (moveKey2 => vlog14), (moveKey3 => vlog15)
L1 => ....
L2 => ....
L3 => (moveKey1 => vlog6)

When L0 compaction runs, it keeps only moveKey3 because the number of
versions to keep is set to 1. (we've dropped moveKey1's latest version)

The new arrangement of keys is
L0 => ....
L1 => (moveKey3 => vlog15)
L2 => ....
L3 => (moveKey1 => vlog6)

Now if we try to GC vlog file 10, the entry read from vlog file will
point to vlog10 but the entry read from LSM Tree will point to v... (continued)

41 of 41 new or added lines in 1 file covered. (100.0%)

48136 of 69123 relevant lines covered (69.64%)

277673.36 hits per line

Jobs
ID Job ID Ran Files Coverage
1 3533.1 08 Jan 2020 12:39PM UTC 0
69.59
Travis Job 3533.1
2 3533.2 08 Jan 2020 12:42PM UTC 0
69.45
Travis Job 3533.2
3 3533.3 08 Jan 2020 12:52PM UTC 0
69.63
Travis Job 3533.3
4 3533.4 08 Jan 2020 12:57PM UTC 0
69.68
Travis Job 3533.4
Source Files on build 3533
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #3533
  • 2a90c665 on github
  • Prev Build on master (#3504)
  • Next Build on master (#3574)
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