mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fix for ALF-786: WCM Cluster / Lucene: Searching in staging returns duplicate entries (when concurrently submtting)
- fixed duplication arising from indexing 0-1 and 0-2 against the index for near simultaneous snapshots - tracking has not been modified nor has index rebuild - the latest index info from the AVM index is definitive and complete - we do not have to do additional work as we do for DM git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19898 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -25,6 +25,7 @@ import java.util.List;
|
||||
import org.alfresco.repo.avm.AVMDAOs;
|
||||
import org.alfresco.repo.avm.AVMNode;
|
||||
import org.alfresco.repo.avm.AVMStore;
|
||||
import org.alfresco.repo.avm.AVMStoreImpl;
|
||||
import org.alfresco.repo.avm.DirectoryNode;
|
||||
import org.alfresco.repo.avm.VersionRoot;
|
||||
import org.alfresco.repo.avm.VersionRootDAO;
|
||||
@@ -140,6 +141,43 @@ class VersionRootDAOIbatis implements VersionRootDAO
|
||||
return new Integer(maxVersionId.intValue());
|
||||
}
|
||||
|
||||
|
||||
|
||||
public List<VersionRoot> getByVersionsTo(AVMStore store, int version)
|
||||
{
|
||||
List<AVMVersionRootEntity> vrEntities = AVMDAOs.Instance().newAVMVersionRootDAO.getByVersionsTo(store.getId(), version);
|
||||
List<VersionRoot> vrs = new ArrayList<VersionRoot>(vrEntities.size());
|
||||
for (AVMVersionRootEntity vrEntity : vrEntities)
|
||||
{
|
||||
vrs.add(convertVersionRootEntityToVersionRoot(vrEntity));
|
||||
}
|
||||
return vrs;
|
||||
}
|
||||
|
||||
public List<VersionRoot> getByVersionsFrom(AVMStore store, int version)
|
||||
{
|
||||
List<AVMVersionRootEntity> vrEntities = AVMDAOs.Instance().newAVMVersionRootDAO.getByVersionsFrom(store.getId(), version);
|
||||
List<VersionRoot> vrs = new ArrayList<VersionRoot>(vrEntities.size());
|
||||
for (AVMVersionRootEntity vrEntity : vrEntities)
|
||||
{
|
||||
vrs.add(convertVersionRootEntityToVersionRoot(vrEntity));
|
||||
}
|
||||
return vrs;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public List<VersionRoot> getByVersionsBetween(AVMStore store, int startVersion, int endVersion)
|
||||
{
|
||||
List<AVMVersionRootEntity> vrEntities = AVMDAOs.Instance().newAVMVersionRootDAO.getByVersionsBetween(store.getId(), startVersion, endVersion);
|
||||
List<VersionRoot> vrs = new ArrayList<VersionRoot>(vrEntities.size());
|
||||
for (AVMVersionRootEntity vrEntity : vrEntities)
|
||||
{
|
||||
vrs.add(convertVersionRootEntityToVersionRoot(vrEntity));
|
||||
}
|
||||
return vrs;
|
||||
}
|
||||
|
||||
private AVMVersionRootEntity convertVersionRootToVersionRootEntity(VersionRoot vr)
|
||||
{
|
||||
if (vr == null)
|
||||
|
Reference in New Issue
Block a user