[Bugs] [Bug 1428049] New: dict_t: make dict_t a real dictionary
bugzilla at redhat.com
bugzilla at redhat.com
Wed Mar 1 19:04:42 UTC 2017
https://bugzilla.redhat.com/show_bug.cgi?id=1428049
Bug ID: 1428049
Summary: dict_t: make dict_t a real dictionary
Product: GlusterFS
Version: mainline
Component: core
Assignee: bugs at gluster.org
Reporter: vbellur at redhat.com
CC: bugs at gluster.org
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 at fb.com>
Change-Id: Ic760eabed82e58881076acbaa46a295dc23e0634
Reviewed-on: http://review.gluster.org/16061
Tested-by: Shreyas Siravara <sshreyas at fb.com>
Smoke: Gluster Build System <jenkins at build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins at build.gluster.org>
CentOS-regression: Gluster Build System <jenkins at build.gluster.org>
Reviewed-by: Kevin Vigor <kvigor at fb.com>
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
More information about the Bugs
mailing list