lahirujayathilake commented on code in PR #47:
URL:
https://github.com/apache/airavata-data-catalog/pull/47#discussion_r1970588592
##########
data-catalog-api/server/service/src/main/java/org/apache/airavata/datacatalog/api/service/DataCatalogAPIService.java:
##########
@@ -194,20 +194,53 @@ public void searchDataProducts(DataProductSearchRequest
request,
StreamObserver<DataProductSearchResponse> responseObserver) {
try {
+ // takeout all the DataProduct
MetadataSchemaQueryResult searchResult =
dataCatalogService.searchDataProducts(request.getUserInfo(),
request.getSql());
- List<DataProduct> dataProducts = searchResult.dataProducts();
-
responseObserver.onNext(DataProductSearchResponse.newBuilder().addAllDataProducts(dataProducts).build());
+ List<DataProduct> allDataProducts = searchResult.dataProducts();
Review Comment:
Better not to load all the DPs at once. If there are 1000s of dps match with
the query then this would cause memory issues.
This should be handle at query level
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]