Jukka Zitting created OAK-1164:
----------------------------------

             Summary: Duplicate binaries
                 Key: OAK-1164
                 URL: https://issues.apache.org/jira/browse/OAK-1164
             Project: Jackrabbit Oak
          Issue Type: Bug
          Components: core
            Reporter: Jukka Zitting
            Assignee: Jukka Zitting


The following piece of code currently causes a binary to be stored (or at least 
read) twice:

{code}
InputStream stream = ...;
Session session = ...;
Value value = sesion.getValueFactory().createValue(stream);
session.getRootNode().setProperty("data", value);
node.save();
{code}

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.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to