resource-disaggregation / jiffy

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

Fix for fifo queue to support multiple producers and consumers #92

Closed charles-typ closed 5 years ago

anuragkh commented 5 years ago

This looks fine. Is it ready to merge? I don't see a multi-threaded test?

charles-typ commented 5 years ago

Changes provided in this PR:

  1. Fix fifo queue logic to support multiple producers and consumers
  2. Add multi-threaded tests
  3. Fix read next logic, make sure it is correct after refreshing. In the partition side, added a readhead which moves whenever readnext() or the dequeue head pointer moves past it. Remove read_next offset from client side to partition side.
charles-typ commented 5 years ago

Previous problem:

  1. What is the expected behavior if dequeue happens on an empty queue? Should the consumer catch an error or should we change dequeue as std::queue::pop, to not return anything?

Fixed to throw an error each time

anuragkh commented 5 years ago

Looks good. Feel free to merge.