Description
The following piece of code currently causes a binary to be stored (or at least read) twice:
InputStream stream = ...;
Session session = ...;
Value value = sesion.getValueFactory().createValue(stream);
session.getRootNode().setProperty("data", value);
node.save();
The reason is the ValueBasedBlob class that prevents the underlying storage to see that the Blob being saved was already stored earlier and thus no extra copy is needed.
Attachments
Issue Links
- breaks
-
OAK-2052 Node.setProperty(String, Value) fails for binary non ValueImpls
- Closed