Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
6b658040
Commit
6b658040
authored
8 years ago
by
juanf
Browse files
Options
Downloads
Patches
Plain Diff
SSDM-3597 : Missing Lucene reindexing datasets
SVN: 36511
parent
ab9e4974
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/DataDAO.java
+16
-8
16 additions, 8 deletions
...sx/cisd/openbis/generic/server/dataaccess/db/DataDAO.java
with
16 additions
and
8 deletions
openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/DataDAO.java
+
16
−
8
View file @
6b658040
...
...
@@ -21,6 +21,7 @@ import java.util.ArrayList;
import
java.util.Arrays
;
import
java.util.Collection
;
import
java.util.Collections
;
import
java.util.Deque
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.LinkedList
;
...
...
@@ -1329,27 +1330,34 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple
flushWithSqlExceptionHandling
(
getHibernateTemplate
());
scheduleDynamicPropertiesEvaluation
(
dataSets
);
//Schedule contained datasets for index update, they also have the experiment and samples ids the index at least
for
(
DataPE
dataSet:
dataSets
)
{
scheduleDynamicPropertiesEvaluation
(
dataSet
.
getContainedDataSets
());
}
// if session is not cleared registration of many samples slows down after each batch
hibernateTemplate
.
clear
();
}
@Override
public
final
void
validateAndSaveUpdatedEntity
(
DataPE
entity
)
throws
DataAccessException
{
this
.
currentSession
().
flush
();
super
.
validateAndSaveUpdatedEntity
(
entity
);
scheduleDynamicPropertiesEvaluation
(
Arrays
.
asList
(
entity
));
}
public
void
scheduleDynamicPropertiesEvaluation
(
List
<
DataPE
>
dataSets
)
{
Deque
<
DataPE
>
toSchedule
=
new
LinkedList
<
DataPE
>(
dataSets
);
List
<
DataPE
>
toUpdate
=
new
ArrayList
<
DataPE
>();
//Schedule contained datasets for index update, they also have the experiment and samples ids the index at least
scheduleDynamicPropertiesEvaluation
(
entity
.
getContainedDataSets
());
while
(
false
==
toSchedule
.
isEmpty
())
{
DataPE
next
=
toSchedule
.
removeFirst
();
toUpdate
.
add
(
next
);
toSchedule
.
addAll
(
next
.
getContainedDataSets
());
}
super
.
scheduleDynamicPropertiesEvaluation
(
toUpdate
);
}
@Override
public
List
<
TechId
>
listDataSetIdsBySampleIds
(
final
Collection
<
TechId
>
samples
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment