Ran
|
Files
39
|
Run time
2s
|
Badge
Embed ▾
README BADGES
|
push
travis-ci
<a href="https://github.com/dgraph-io/badger/commit/<a class=hub.com/dgraph-io/badger/commit/bcf8b972e5a27ed2406e3061902eff5cec4966ab">bcf8b972e<a href="https://github.com/dgraph-io/badger/commit/bcf8b972e5a27ed2406e3061902eff5cec4966ab">">Flush vlog buffer if it grows beyond threshold (#1067) The OOM happens when we trying to flush write batch. When we insert data into a transaction, we calculate the size of the transaction by using the following function https://github.com/dgraph-io/badger/blob/</a><a class="double-link" href="https://github.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/b20e8b6e8b742236f4a88f7c0cead2d64118a416">b20e8b6e8">b20e8b6e8</a><a href="https://github.com/dgraph-io/badger/commit/bcf8b972e5a27ed2406e3061902eff5cec4966ab">/txn.go#L295-L300 which uses `estimateSize` function https://github.com/dgraph-io/badger/blob/b20e8b6e8b742236f4a88f7c0cead2d64118a416/structs.go#L134-L139 For a key size of 4 and a value size of 1 MB, the `estimateSize` function would return 4 + 12 + 2 = 18 byte which is valid in case of SSTs but not for a vlog file. The entry size for vlog would be around 1 MB and when all such entries are packed into a single request for vlog, the bytes.buffer in vlog crashes with OOM error. This commit fixes it.</a>
6438 of 8297 relevant lines covered (77.59%)
63516.96 hits per line
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|