Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 357184 - reuse Blob
Summary: reuse Blob
Status: CLOSED DUPLICATE of bug 351202
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.core (show other bugs)
Version: 4.1   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Eike Stepper CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-09 02:36 EDT by georgehill CLA
Modified: 2012-09-21 07:18 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description georgehill CLA 2011-09-09 02:36:25 EDT
Build Identifier: 20110615-0604

The following code in 
CDOCommitContextImpl.preCommit() not works, as byte arrays are not equal by content, thus preventing reuse of blobs in the database

for (byte[] id : alreadyKnown) {
   lobs.remove(id);
} 


Caused by: java.sql.SQLIntegrityConstraintViolationException: The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by 'CDO_LOBS_IDX0' defined on 'CDO_LOBS'. 

Reproducible: Always

Steps to Reproduce:
1. Create a blob and commit
2. In the same eobject change an different feature
3. commit and get the error message
Comment 1 Eike Stepper CLA 2011-09-19 01:33:58 EDT
Thank you for tracking down the issue, but I noticed that it has already been fixed in bug 351067 and back ported to 4.0 in bug 351202. 4.0 SR1 is about to be rolled out. In the meantime please have a look at our maintenance builds: http://www.eclipse.org/cdo/downloads/#maintenance

*** This bug has been marked as a duplicate of bug 351202 ***
Comment 2 Eike Stepper CLA 2012-09-21 07:18:31 EDT
Closing.