Revert "fixie 4"

This reverts commit 7b129a7eb9.
This commit is contained in:
2024-06-23 00:01:37 +02:00
parent 7b129a7eb9
commit 4ca901f5b9

View File

@@ -41,11 +41,7 @@ public class RemoteObjectServiceServer implements DhfsObjectSyncGrpc {
var obj = jObjectManager.get(request.getName()).orElseThrow(() -> new StatusRuntimeException(Status.NOT_FOUND));
Pair<ObjectHeader, ByteString> read = obj.runReadLocked((m) -> {
if (!obj.tryLocalResolve())
throw new StatusRuntimeException(Status.UNAVAILABLE.withDescription("Not available locally"));
return obj.runReadLocked((meta, data) -> Pair.of(meta.toRpcHeader(), SerializationHelper.serialize(data)));
});
Pair<ObjectHeader, ByteString> read = obj.runReadLocked((meta, data) -> Pair.of(meta.toRpcHeader(), SerializationHelper.serialize(data)));
var replyObj = ApiObject.newBuilder().setHeader(read.getLeft()).setContent(read.getRight()).build();
return Uni.createFrom().item(GetObjectReply.newBuilder().setObject(replyObj).build());
}