Prevent ItemNotFoundAfterInsert by keeping the handle
commit66224ae797823a5392fd553798cec288edf23783
authorTom Yang <toyang@fb.com>
Thu, 8 Oct 2020 18:49:54 +0000 (8 11:49 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 8 Oct 2020 18:52:13 +0000 (8 11:52 -0700)
treeb344095f704b2428978c772d3625277edb3dc5e2
parent7952b781ce6047bfa1fa5eea3318c56d81fe65cc
Prevent ItemNotFoundAfterInsert by keeping the handle

Summary: Added a new insert method to the cachelib rust API that takes a reference to a handle instead of taking ownership. This way, decl service keeps ownership of the handle and avoids the race of inserting into the cache then getting from the cache.

Differential Revision: D24098327

fbshipit-source-id: eb03afdd67b76dfe5f990bf809ab508216103672
hphp/hack/src/oxidized_by_ref/manual/direct_decl_parser.rs