Skip to content

BUGs in Zipfian generator #34

@Losk-x

Description

@Losk-x

ZETAN is not a constant

static constexpr double ZETAN = 26.46902820178302;

Though this line is directly copied from ycsb, it neglects the fact that ZETAN is determined by the num_keys_ and ZIPFIAN_CONSTANT.
In ycsb's implementation, the num_keys_ is also fixed, so the ZETAN can be a constant. See:

https://github.com/brianfrankcooper/YCSB/blob/dbe92a1fbd24be061fcf01e56838afb83e6f9c58/core/src/main/java/site/ycsb/generator/ScrambledZipfianGenerator.java#L35

https://github.com/brianfrankcooper/YCSB/blob/dbe92a1fbd24be061fcf01e56838afb83e6f9c58/core/src/main/java/site/ycsb/generator/ZipfianGenerator.java#L244

Hash function's keyspace may be too small

inline uint32_t fnv1a(int fourBytes, uint32_t hash = SEED) {

Using a fnv1a-32 is not consistent with yscb (fnv1a-64). It may cause hash collision and make keyspace not fully-covered when num_keys_ is closed with 2^32-1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions