Ran
|
Jobs
4
|
Files
31
|
Run time
3min
|
Badge
README BADGES
|
push
travis-ci
<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">">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/</a><a class="double-link" href="https://github.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="double-link" href="https://git"><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'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
ID | Job ID | Ran | Files | Coverage | |
---|---|---|---|---|---|
1 | 1930.1 | 0 |
79.21 |
Travis Job 1930.1 | |
2 | 1930.2 | 0 |
79.21 |
Travis Job 1930.2 | |
3 | 1930.3 | 0 |
79.13 |
Travis Job 1930.3 | |
4 | 1930.4 | 0 |
79.14 |
Travis Job 1930.4 |