efficient / libcuckoo

A high-performance, concurrent hash table
Other
1.62k stars 275 forks source link

Perfect forwarding bug #20

Closed manugoyal closed 8 years ago

manugoyal commented 8 years ago

In cuckoo_insert_loop, we forward the value to cuckoo_insert, but if we resize and try again, we'll be re-forwarding the value, which won't actually work on values that have been moved. We need to find a way to support perfect forwarding and still be able to retry the insert when the table is full.

manugoyal commented 8 years ago

As long as the constructor isn't called, you should actually be able to forward values again if the operation fails. We just have to make sure that after constructing the kvpair, the operation is guaranteed to succeed.