mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
Fix "Simultaneous deletion of multiple bitstreams from the same bundle often compromises the state of the bundle" (#8778)
* DS-8694 * clean imports * cleaning code * DS-8694 - re-deletion of bitstream throw exception * ds-8694 - clean code
This commit is contained in:
@@ -195,7 +195,11 @@ public abstract class DSpaceRestRepository<T extends RestAddressableModel, ID ex
|
||||
/**
|
||||
* Delete the object identified by its ID
|
||||
*/
|
||||
public void deleteById(ID id) {
|
||||
/**
|
||||
* Method should be synchronized to avoid hibernate partial deletion bug when deleting multiple bitstreams:
|
||||
* https://github.com/DSpace/DSpace/issues/8694
|
||||
*/
|
||||
public synchronized void deleteById(ID id) {
|
||||
Context context = obtainContext();
|
||||
try {
|
||||
getThisRepository().delete(context, id);
|
||||
|
Reference in New Issue
Block a user