fix AtomicHashMap race condition
authorDario Russi <drussi@fb.com>
Tue, 14 Jan 2014 01:00:57 +0000 (17:00 -0800)
committerJordan DeLong <jdelong@fb.com>
Thu, 16 Jan 2014 19:21:30 +0000 (11:21 -0800)
commit29d4c417a8a05c743d3a89310ebc1cbb2dfa0cfd
tree653da7f9c1b9142af68127137f5df35121db1b06
parent6508587c025eb9cd133abe73759e12a2049bdfe1
fix AtomicHashMap race condition

Summary: AHM::find checks that the returned SimpleRetT index is >= numMapsAllocated_ but that value may have changed and find pick the first element in the next sub map. Use success instead.

@override-unit-failures

Test Plan: unit tests

Reviewed By: delong.j@fb.com

FB internal diff: D1126684
folly/AtomicHashMap-inl.h