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

citusdata / pg_shard / 515
95%
develop: 36%

Build:
Build:
LAST BUILD BRANCH: develop_candidate
DEFAULT BRANCH: develop
Ran 21 Aug 2015 11:41PM UTC
Jobs 3
Files 18
Run time 1min
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

pending completion
515

push

travis-ci

jasonmp85
Fix and improve hash token distribution algorithm

There are 2^32 distinct "hash tokens" in our hash space, but we were
using INT32_MAX (2^32 - 1) in the code instead. Because of this, shard
counts which one might expect to divide evenly into the space (such as
16, 32, or 256) had fewer tokens than they should have. The remainder
of the tokens were stuffed into the last shard, causing uneven load.

Though fixing the INT32_MAX bug solves the above case, it still doesn't
deal with the remainder, which can be as large as `shardCount - 1`. We
could continue stuffing it into the top shard, but I find it nicer to
have all shard sizes be within one token of one another.

We previously divided the shard count into the hash token count to get
a "hash token increment" and added that increment each iteration: this
gives something like shardIndex * (hashCount / shardCount). By changing
the grouping to (shardIndex * hashCount) / shardCount, the issue with
distributing the remainder goes away entirely and we get "nice" shards.

2165 of 2268 relevant lines covered (95.46%)

1031.51 hits per line

Jobs
ID Job ID Ran Files Coverage
1 515.1 (PGVERSION=9.3) 21 Aug 2015 11:43PM UTC 18
95.15
Travis Job 515.1
2 515.2 (PGVERSION=9.4) 21 Aug 2015 11:41PM UTC 18
95.15
Travis Job 515.2
3 515.3 (PGVERSION=40.0) 21 Aug 2015 11:41PM UTC 18
94.13
Travis Job 515.3
Source Files on build 515
  • List 18
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Travis Build #515
  • 9bc5592b on github
  • Next Build on better_hash_token_distribution (#529)
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

© 2023 Coveralls, Inc