@Override public void dinvoke(H2ONode sender) { assert _key.home() || _val == null; // Only PUT to home for keys, or remote invalidation from home Paxos.lockCloud(); // Initialize Value for having a single known replica (the sender) if (_val != null) _val.initReplicaHome(sender, _key); // Spin, until we update something. Value old = H2O.raw_get(_key); // Raw-get: do not lazy-manifest if overwriting while (H2O.putIfMatch(_key, _val, old) != old) old = H2O.raw_get(_key); // Repeat until we update something. // Invalidate remote caches. Block, so that all invalidates are done // before we return to the remote caller. if (_key.home() && old != null) old.lockAndInvalidate(sender, new Futures()).blockForPending(); // No return result _key = null; _val = null; tryComplete(); }
static boolean checkSaneFrame_impl() { for (Key k : H2O.localKeySet()) { Value val = H2O.raw_get(k); if (val.isFrame()) { Frame fr = val.get(); Vec vecs[] = fr.vecs(); for (int i = 0; i < vecs.length; i++) { Vec v = vecs[i]; if (DKV.get(v._key) == null) { System.err.println( "Frame " + fr._key + " in the DKV, is missing Vec " + v._key + ", name=" + fr._names[i]); return false; } } } } return true; }