rich-pager-68736
02/17/2023, 6:52 AMAn unknown error occurred. (code 500)
Failed to load results! An unexpected error occurred.
And in the GMS logs, it looks like this:
06:42:03.642 [Thread-484] ERROR c.l.d.g.e.DataHubDataFetcherExceptionHandler:21 - Failed to execute DataFetcher
java.util.concurrent.CompletionException: java.lang.RuntimeException: Failed to retrieve entities of type Dataset
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:331)
at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:346)
at java.base/java.util.concurrent.CompletableFuture$BiRelay.tryFire(CompletableFuture.java:1423)
at java.base/java.util.concurrent.CompletableFuture$CoCompletion.tryFire(CompletableFuture.java:1144)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2088)
at org.dataloader.DataLoaderHelper.lambda$dispatchQueueBatch$3(DataLoaderHelper.java:272)
at java.base/java.util.concurrent.CompletableFuture.uniExceptionally(CompletableFuture.java:986)
at java.base/java.util.concurrent.CompletableFuture$UniExceptionally.tryFire(CompletableFuture.java:970)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1705)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.RuntimeException: Failed to retrieve entities of type Dataset
at com.linkedin.datahub.graphql.GmsGraphQLEngine.lambda$createDataLoader$183(GmsGraphQLEngine.java:1588)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
... 1 common frames omitted
Caused by: java.lang.RuntimeException: Failed to batch load Datasets
at com.linkedin.datahub.graphql.types.dataset.DatasetType.batchLoad(DatasetType.java:146)
at com.linkedin.datahub.graphql.GmsGraphQLEngine.lambda$createDataLoader$183(GmsGraphQLEngine.java:1585)
... 2 common frames omitted
Caused by: java.lang.IllegalStateException: Duplicate key EntityAspectIdentifier(urn=urn:li:dataset:(urn:li:dataPlatform:dbt,XXXXXXXXXXXXX.YYYYYYYYYYYYYY.ZZZZZZZZZZZZZ,PROD), aspect=upstreamLineage, version=0) (attempted merging values com.linkedin.metadata.entity.EntityAspect@f613625b and com.linkedin.metadata.entity.EntityAspect@f613625b)
at java.base/java.util.stream.Collectors.duplicateKeyException(Collectors.java:133)
at java.base/java.util.stream.Collectors.lambda$uniqKeysMapAccumulator$1(Collectors.java:180)
at java.base/java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
at java.base/java.util.ArrayList$Itr.forEachRemaining(ArrayList.java:1033)
at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
at com.linkedin.metadata.entity.ebean.EbeanAspectDao.batchGet(EbeanAspectDao.java:263)
at com.linkedin.metadata.entity.EntityService.getEnvelopedAspects(EntityService.java:1826)
at com.linkedin.metadata.entity.EntityService.getCorrespondingAspects(EntityService.java:379)
at com.linkedin.metadata.entity.EntityService.getLatestEnvelopedAspects(EntityService.java:333)
at com.linkedin.metadata.entity.EntityService.getEntitiesV2(EntityService.java:289)
at com.linkedin.metadata.client.JavaEntityClient.batchGetV2(JavaEntityClient.java:109)
at com.linkedin.datahub.graphql.types.dataset.DatasetType.batchLoad(DatasetType.java:130)
... 3 common frames omitted
06:42:03.645 [Thread-421] ERROR c.datahub.graphql.GraphQLController:99 - Errors while executing graphQL query: "query getSearchResultsForMultiple($input: SearchAcrossEntitiesInput!) {\n searchAcrossEntitie
...rich-pager-68736
02/17/2023, 1:48 PM-a clean option).
Next thing I did was updating from v0.9.6.1 to v.0.10.0 but the error persists :-(rich-pager-68736
02/17/2023, 4:05 PMrich-pager-68736
02/20/2023, 8:54 AMrich-pager-68736
02/22/2023, 6:23 AMrich-pager-68736
02/24/2023, 8:43 AMquery listRecommendations {
listRecommendations(input: {userUrn:"urn:li:corpuser:ME", requestContext: {scenario: HOME}, limit: 4}) {
modules {
moduleId
renderType
content {
value
entity {
...on Entity {
urn
}
}
}
}
}
}
increasing the limit to 5 does not work anymore. Throws the same error as above, resulting in errors in the GraphQL query - the entities of type dataset are null:
{
"moduleId": "RecentlyEditedEntities",
"renderType": "ENTITY_NAME_LIST",
"content": [
{
"value": "urn:li:container:721c0d86a2715e294b582d01bcfeef89",
"entity": {
"urn": "urn:li:container:721c0d86a2715e294b582d01bcfeef89"
}
},
{
"value": "urn:li:dataset:(urn:li:dataPlatform:snowflake,abc,PROD)",
"entity": null
},
{
"value": "urn:li:dataset:(urn:li:dataPlatform:dbt,def,PROD)",
"entity": null
},
{
"value": "urn:li:container:d0748a3ef091458dda00a7df13b396df",
"entity": {
"urn": "urn:li:container:d0748a3ef091458dda00a7df13b396df"
}
}
]
},
what's really strange, and here I do not comprehend it anymore, if I remove the fragment part of the query and use the urn directly, it works again, like this:
query listRecommendations {
listRecommendations(input: {userUrn:"urn:li:corpuser:ME", requestContext: {scenario: HOME}, limit: 5}) {
modules {
moduleId
renderType
content {
value
entity {
# ...on Entity {
urn
# }
}
}
}
}
}bulky-electrician-72362
02/27/2023, 9:31 AMbulky-electrician-72362
02/27/2023, 9:31 AMrich-pager-68736
02/27/2023, 12:50 PMbulky-electrician-72362
02/27/2023, 1:11 PMurn=urn:li:dataset:(urn:li:dataPlatform:dbt,XXXXXXXXXXXXX.YYYYYYYYYYYYYY.ZZZZZZZZZZZZZ,PROD), what caused the problem for yourich-pager-68736
02/27/2023, 1:24 PMrich-pager-68736
02/27/2023, 1:27 PMlively-spring-5482
04/04/2023, 2:29 PMcsv-enricher ingestion that was meant to import some additional aspects - tags, glossary, an so on.
I am wondering if by any chance you were able to find a satisfying solution to your problems and would share the solution with me (us :))rich-pager-68736
04/05/2023, 5:39 AMlively-spring-5482
04/05/2023, 8:29 AMlively-spring-5482
04/12/2023, 7:36 AMdatasetindex_v2 for something that got interpreted as new URNs.
3. When using the UI we’ve noticed lots of 500 errors when entering search prompt.
4. After an investigation we’ve noticed autoCompleteForMultiple Graph API query is returning not only valid (existing) URNs but also those with incorrect capitalisation - see attachment. Note the list is not formally duplicated.
5. The GMS engine processing of autoCompleteForMultiple involves retrieval of entities aspect which is handled as a batchLoad call from MySQL with the URNs mentioned in point 4 as input keys.
6. With:
a. MySQL being case insensitive
b. the UNION ALL logic used by batchLoad
c. two ids being identical and differing only by their casing
the result set retrieved from DAO contains duplicated entries. This can’t be processed further and GMS throws an exception when converting results to a map keyed by URN.
7. Ultimately we were able to solve the issue without clearing the whole database just by running a delete by query in ElasticSearch removing flawed “Snowflake” URNs from datasetindex_v2.
Not sure where the fix should be applied but there is clearly no validation of the input in csv-enricher and that eventually leads to serious data corruption. Also, there is a huge difference in the way the two persistence layers (ElasticSearch and MySQL) are behaving. This will no doubts lead to more problems in the future if not addressed.