* @return value of a remote get, or null
* @throws Throwable if there are problems
*/
private Object remoteGetAndStoreInL1(InvocationContext ctx, Object key, boolean isWrite, FlagAffectedCommand command) throws Throwable {
//DataLocality locality = dm.getLocality(key);
DataLocality locality = dm.getReadConsistentHash().isKeyLocalToNode(rpcManager.getAddress(), key) ? DataLocality.LOCAL : DataLocality.NOT_LOCAL;
if (ctx.isOriginLocal() && !locality.isLocal() && isNotInL1(key)) {
return realRemoteGet(ctx, key, true, isWrite, command);
} else {
// maybe we are still rehashing as a joiner? ISPN-258
if (locality.isUncertain()) {
if (trace)
log.tracef("Key %s is mapped to local node %s, but a rehash is in progress so may need to look elsewhere", key, rpcManager.getAddress());
// try a remote lookup all the same
return realRemoteGet(ctx, key, false, isWrite, command);
} else {