@@ -182,14 +182,11 @@ typename NvmCache<C>::WriteHandle NvmCache<C>::find(HashedKey hk) {
182182 XDCHECK (ctx);
183183 auto guard = folly::makeGuard ([hk, this ]() { removeFromFillMap (hk); });
184184
185- auto status = navyCache_->lookupAsync (
185+ navyCache_->lookupAsync (
186186 HashedKey::precomputed (ctx->getKey (), hk.keyHash ()),
187187 [this , ctx](navy::Status s, HashedKey k, navy::Buffer v) {
188188 this ->onGetComplete (*ctx, s, k, v.view ());
189189 });
190-
191- XDCHECK_EQ (status, navy::Status::Ok);
192-
193190 guard.dismiss ();
194191 return hdl;
195192}
@@ -257,17 +254,14 @@ typename NvmCache<C>::WriteHandle NvmCache<C>::peek(folly::StringPiece key) {
257254
258255 // no need for fill lock or inspecting the state of other concurrent
259256 // operations since we only want to check the state for debugging purposes.
260- auto status = navyCache_->lookupAsync (
257+ navyCache_->lookupAsync (
261258 HashedKey{key}, [&, this ](navy::Status st, HashedKey, navy::Buffer v) {
262259 if (st != navy::Status::NotFound) {
263260 auto nvmItem = reinterpret_cast <const NvmItem*>(v.data ());
264261 hdl = createItem (key, *nvmItem);
265262 }
266263 b.post ();
267264 });
268- if (status != navy::Status::Ok) {
269- return hdl;
270- }
271265 b.wait ();
272266 return hdl;
273267}
@@ -843,11 +837,8 @@ void NvmCache<C>::remove(HashedKey hk, DeleteTombStoneGuard tombstone) {
843837 static_cast <int >(status)));
844838 };
845839
846- auto status = navyCache_->removeAsync (
847- HashedKey::precomputed (ctx.key (), hk.keyHash ()), delCleanup);
848- if (status != navy::Status::Ok) {
849- delCleanup (status, HashedKey::precomputed (" " , 0 ));
850- }
840+ navyCache_->removeAsync (HashedKey::precomputed (ctx.key (), hk.keyHash ()),
841+ delCleanup);
851842}
852843
853844template <typename C>
0 commit comments