able-evening-90828
05/04/2023, 1:57 AM0.10.2
server and 0.10.2.2
CLI for the UI ingestion.
We looked at the metadata_aspect_v2
table and noticed the dataPlatformInstance
is missing the instance
field in the metadata
column. We saw the following:
{"platform":"urn:li:dataPlatform:mysql"}
as opposed to
{"platform":"urn:li:dataPlatform:mysql","instance":"<OUR_PLATFORM_INSTANCE_URN"}
We have never had such problem before. Has anyone else seen this?able-evening-90828
05/04/2023, 1:57 AMlively-cat-88289
05/04/2023, 1:57 AMastonishing-answer-96712
05/05/2023, 5:35 PMable-evening-90828
05/05/2023, 5:51 PMdataset
entity type exist, if not, then the code attempts to create the aspect.
Because all three requests were running in parallel in GMS, it is a race condition. We observed that whenever request 2 won, the DPI aspect was populated correctly with the instance
field. Whenever request 1 or 3 won, the DPI was missing the instance
field.
The code for creating the DPI aspect if it doesn't exist seems wrong because it doesn't set the instance
field. As a result, the inserted aspect is missing the instance field.
public static Optional<DataPlatformInstance> buildDataPlatformInstance(String entityType, RecordTemplate keyAspect) {
try {
return Optional.ofNullable(getDefaultDataPlatform(entityType, keyAspect))
.map(platform -> new DataPlatformInstance().setPlatform(platform));
} catch (URISyntaxException e) {
log.error("Failed to generate data platform instance for entity {}, keyAspect {}", entityType, keyAspect);
return Optional.empty();
}
}
However, this code has been there for a long time and we have only started seeing this problem in v0.10.2
, so it is still puzzling why this suddenly started happening. You would expect this problem to have happened given that it is a race condition.able-evening-90828
05/06/2023, 12:36 AMmax_threads
, the problem didn't happen.
The server logic as pointed out above doesn't handle the DataPlatformInstance
logic correctly when there are parallel requests trying to update it.able-evening-90828
05/08/2023, 6:21 PMgray-shoe-75895
05/08/2023, 6:44 PM