diff options
| author | Xiaofei Du <xiaofeidu@fb.com> | 2016-08-18 10:05:32 -0700 | 
|---|---|---|
| committer | Shreyas Siravara <sshreyas@fb.com> | 2016-12-08 08:27:24 -0800 | 
| commit | 1508cde8e6022ae40a63cfaf94a7ee387e188dcf (patch) | |
| tree | 2398a7545d802298dc0ec3812b214aeb3d8c666a /xlators/performance | |
| parent | 0e75c988f02b4fe36a99d34e5039d61c0ab1b64f (diff) | |
dict_t: make dict_t a real dictionary
Summary:
- During testing, I found dict_t actually always has a hash_size
of 1. So basically it's not a dictionary. It's list. This diff fixed that problem.
A bug in dictionary is also fixed here. SuperFastHash generates
uint32_t, but it was assigned to a int, which could suffer from
overflow. Previously the hash_size is always 1, so the bug was not triggered.
Under new hash_size, it's easy to trigger that bug.
- For existing GlusterFS codebase, dict_new need to be calling dict_t
*get_new_dict_full (uint32_t size_hint) to use the new logic. An
estimated number of items you are going to insert into the dictionary
is the input for that function.
- This is a port of D3736252 to 3.8
Test Plan: Prove tests
Reviewed By: kvigor
Signed-off-by: Shreyas Siravara <sshreyas@fb.com>
Change-Id: Ic760eabed82e58881076acbaa46a295dc23e0634
Reviewed-on: http://review.gluster.org/16061
Tested-by: Shreyas Siravara <sshreyas@fb.com>
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Kevin Vigor <kvigor@fb.com>
Diffstat (limited to 'xlators/performance')
0 files changed, 0 insertions, 0 deletions
