resource-disaggregation / jiffy

Virtual Memory Abstraction for Serverless Architectures
Apache License 2.0
45 stars 14 forks source link

Use std::unordered_map instead of cuckoohashmap, Fix hash table client functions #94

Closed charles-typ closed 5 years ago

charles-typ commented 5 years ago

Changes in this PR:

  1. Replace cuckoo hash map with std::unordered_map
  2. Add client functions for update, upsert, exists
  3. Add remove buffer to accelerate auto_scaling remove
  4. Fix auto_scaling logic for all functions
  5. Fix tests.

TODOs:

charles-typ commented 5 years ago

Previous Question:

Fix:

Add exception handler to every make_binary, and return "!redo".

But for scale_remove and remove, since we want the partition to be able to reduce its size of data instead of stuck in this "!redo", I added a new memory allocator simply for allocating the temporary values for removing data.

The memory allocator should not use much space since it's storing temporary data only and the space could be set in libjiffy/src/jiffy/storage/hash_table/hash_table_defs.h : HASH_TABLE_MAX_KEY_SIZE

Currently it's set to 65536, could be set much more bigger since it would release the memory immediately after allocating it.

anuragkh commented 5 years ago

Looks good to me. Keeping maximum key size at 64kB is reasonable, keys larger than that are uncommon. Feel free to merge.

anuragkh commented 5 years ago

Is this still WIP?

charles-typ commented 5 years ago

No it's finished. title changed