Commits (23)
-
Quanah Gibson-Mount authored4e8f9130
-
528ab11f
-
Quanah Gibson-Mount authored2286e2ed
-
Quanah Gibson-Mount authored47974536
-
Howard Chu authored2346dfd2
-
Quanah Gibson-Mount authoredf3e0707e
-
57b0ed90
-
Quanah Gibson-Mount authored0d0d5072
-
e5105e70
-
6b46232a
-
cn=config changes might cause slapi_plugins_used transition from 0 during the lifetime of operation (cn=config change or syncrepl) or a connection and we should be able to deal with that.
71560032 -
Ondřej Kuzník authored79960723
-
Prior to this change, given two records of weight 1 the algorithm would return them in the order (0,1) with 100% probability instead of the desired 50%. This was due to an off-by-one error in the range test. srv_rand() returns a float in the range [0.0, 1.0[, so r is an integer in the range [0, total[. The correct probability for record 0 to be chosen is a[0].weight/total, not (a[0].weight+1)/total.
ee7502ac -
The fallback to a straight Fisher-Yates shuffle needs to occur whenever the sum of the *remaining* weights is zero, or else the remaining records will not be reordered. Testing only once at the beginning covers the case when all weights are zero, and obviously no shuffling is needed when only one weight is zero; but other weight combinations are possible, such as (1, 0, 0).
8006ee58 -
3e5490f4
-
Quanah Gibson-Mount authored58c97882
-
ldif_open_mem() is the fmemopen(3) equivalent of ldif_open() which opens an ldif steam from memory, rather than from a file.
42d72389 -
eae2dfde
-
d1e874c6
-
182ec30a
-
e24a6bf5
-
Quanah Gibson-Mount authored64d11337
-
Quanah Gibson-Mount authorede3e725cd