|
Ran
|
Jobs
4
|
Files
251
|
Run time
14min
|
Badge
README BADGES
|
push
travis-ci
<a href="https://github.com/dgraph-io/badger/commit/<a class=hub.com/dgraph-io/badger/commit/969a8e86294e164180aabd630313a06b97827081">969a8e862<a href="https://github.com/dgraph-io/badger/commit/969a8e86294e164180aabd630313a06b97827081">">Fix windows dataloss issue (#1134) Windows doesn&#39;t allow memory mapping a file to a size greater than the file&#39;s actual size. To circumvent this, we increase the file size by truncating it. 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/f5b63211d7f3e2f5f8b698893313b2a54e4df7de">f5b63211d">f5b63211d</a><a href="https://github.com/dgraph-io/badger/commit/969a8e86294e164180aabd630313a06b97827081">/y/mmap_windows.go#L41-L48 When badger would re-open, we try to replay this "truncated" file. Since this truncated file consists of all zeros, the replay would return the last offset as `zero` and then we would truncate the original file to size `zero`. The replay function would return `zero` as the last valid offset which was wrong. The last valid offset is start offset plus the forward movements of the file offset. So instead of https://github.com/dgraph-io/badger/blob/f5b63211d7f3e2f5f8b698893313b2a54e4df7de/value.go#L433 ```go var validEndOff uint32 // notice we're starting from zero, not the start point. ``` we should be doing ```go var validEndOff uint32 = offset ``` Fixes - https://github.com/dgraph-io/badger/issues/1126</a>
1 of 1 new or added line in 1 file covered. (100.0%)
40079 of 51557 relevant lines covered (77.74%)
316087.09 hits per line
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 3396.1 | 0 |
77.5 |
Travis Job 3396.1 | |
| 2 | 3396.2 | 0 |
77.54 |
Travis Job 3396.2 | |
| 3 | 3396.3 | 0 |
77.49 |
Travis Job 3396.3 | |
| 4 | 3396.4 | 0 |
77.55 |
Travis Job 3396.4 |