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

dgraph-io / ristretto / 6044253271
74%

Build:
DEFAULT BRANCH: main
Ran 01 Sep 2023 01:21AM UTC
Jobs 1
Files 23
Run time 1s
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

01 Sep 2023 01:09AM UTC coverage: 73.707%. Remained the same
6044253271

push

github

web-flow
uint32 to uint64 in slice methods (#323)

## Problem
I'm currently on Dgraph 21.12 unable to export my data.
Export fails on just two nodes out of 7 with the "Unexpected EOF" error:

```
Dec 14 11:31:51 dm-dgraph-04 dgraph[224355]: I1214 11:31:51.840130  224355 log.go:34] Export [01h26m22s] Scan (12): ~2.1 TiB/2.5 TiB at 177 MiB/sec. Sent: 801.5 GiB at 231 MiB/sec. jemalloc: 7.5 GiB
Dec 14 11:31:55 dm-dgraph-04 dgraph[224355]: W1214 11:31:55.408201  224355 log.go:36] Error while sending: unexpected EOF
```

Skipping rather long investigation of this issue I came to find length
of slice, written to the Buffer during export exceed the size of uint32
(i've decoded varint before Value field in Badger KV struct with RDF's
to get something around 4.5Gb, which is expected for a rather bloated
reverse edge to the one of the most common nodes in my DB. Also count
query returns 72 105 794 connected nodes which is, welp, quite a lot).

Not to mention that working with `int` which is almost always is `int64`
and then casually casting it to `uint32` w/o any checks or warnings is
as bad as it gets.

## Solution
Find any `4` and `Uint32` and carefully replace them with `8` and
`Uint64`. As this happens only in slice-related methods the fix is quite
easy. Locally tests run just fine, but i had to patch the sort one to
accommodate for size changes. Also i did test 21.12-related badger
version and tests run fine too.

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

2223 of 3016 relevant lines covered (73.71%)

2506667.85 hits per line

Jobs
ID Job ID Ran Files Coverage
1 6044253271.1 01 Sep 2023 01:21AM UTC 23
73.71
GitHub Action Run
Source Files on build 6044253271
  • Tree
  • List 23
  • Changed 10
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • c00b3525 on github
  • Prev Build on main (#6044154258)
  • Next Build on main (#6046105025)
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