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> Change-Id: Ic760eabed82e58881076acbaa46a295dc23e0634 Reviewed-on: http://review.gluster.org/16061 Tested-by: Shreyas Siravara <sshreyas> Smoke: Gluster Build System <jenkins.org> NetBSD-regression: NetBSD Build System <jenkins.org> CentOS-regression: Gluster Build System <jenkins.org> Reviewed-by: Kevin Vigor <kvigor>
REVIEW: https://review.gluster.org/16830 (dict_t: make dict_t a real dictionary) posted (#1) for review on master by Vijay Bellur (vbellur)
Merged long time ago.