Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(snomed.datastore): Flush pending expand requests in request cache... #1351

Merged
merged 2 commits into from
Dec 3, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
import com.b2international.snowowl.snomed.datastore.internal.rf2.ComponentIdSnomedDsvExportItem;
import com.b2international.snowowl.snomed.datastore.internal.rf2.DatatypeSnomedDsvExportItem;
import com.b2international.snowowl.snomed.datastore.internal.rf2.SnomedRefSetDSVExportModel;
import com.b2international.snowowl.snomed.datastore.request.SnomedConceptRequestCache;
import com.b2international.snowowl.snomed.datastore.request.SnomedConceptSearchRequestBuilder;
import com.b2international.snowowl.snomed.datastore.request.SnomedRequests;
import com.google.common.annotations.VisibleForTesting;
Expand Down Expand Up @@ -489,6 +490,8 @@ private Map<String, String> createTypeIdMap(SnomedConcepts concepts) {
private void writeValues(IProgressMonitor monitor, BufferedWriter writer) throws IOException {
final Iterable<SnomedConcepts> chunks = () -> getConceptStream(DATA_EXPAND).iterator();
for (SnomedConcepts chunk : chunks) {
// make sure we compute all requested expansions before we move forward
context.service(SnomedConceptRequestCache.class).compute(context);
writeValues(writer, chunk);
monitor.worked(chunk.getItems().size());
}
Expand Down
Loading