I'm using an AtomicHashMap to store routing information for Proxygen Handlers.
I can insert and erase values fine on the same thread, but the erase() function doesn't seem to reset the size if it's on a different thread, and then I see folly::AtomicHashMapFullError
here's a simplified version of my problem with 3 threads. I am 100% positive that there is no race condition here. the threads cannot execute out of the order I have below.
auto IdToHandler_ = new folly::AtomicHashMap<int64_t, int64_t>(1);
thread 1 =>
IdToHandler_->insert(1,2)
thread 2 =>
IdToHandler_->erase(1)// Should erase the key
thread 3 =>
IdToHandler_->insert(1,2) // THROWS folly::AtomicHashMapFullError