-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
Overview
When multiple users access one AAS, the submodel GET API hangs due to a certain pattern of access, does not return a response, and also does not output logs.
the problem is not resolved even after retrying, because a data integrity problem may be occurred .
Specifically, if you call the BaSyx AAS Repository API in the order below, no response will be returned in step 4.
- User A calls the API to get AAS "C" and retains its contents
- User B calls the API to add submodel "D" to AAS "C"
- User A modifies some of the results in 1. and calls AAS "C" modification API.
- Call API to get submodel "D" of AAS "C"
This seems to be because the property.submodelsin AAS GET API reponse is different from the submodel database.
Impact of this issue
Applications using BaSyx cannot be deployed in an environment with multiple users, therefore it is not possible to move from Proof of Concept to the next step.
Steps to reproduce
Environment
- BaSyx version: 1.5.1
- backend: MongoDB
- MongoDB: 6.0.13
- Docker: 24.0.7
Docker compose settings
version: "3.9"
services:
aas-registry:
image: eclipsebasyx/aas-registry:1.5.1
ports:
- 8082:4000
volumes:
- "${REGISTRY_CONFIG_PATH}:/usr/share/config"
aas-server:
image: eclipsebasyx/aas-server:1.5.1
ports:
- 4001:4001
volumes:
- "${REPOSITORY_CONFIG_PATH}:/usr/share/config"
mongo:
image: mongo:6.0.13-rc0
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: pass
ports:
- 27017:27017A sample procesure
- A User gets a AAS (ID: https//example.com/aas/0).
API operation:GET /aasServer/shells/https%2F%2Fexample.com%2Faas%2F0
response json
{
"conceptDictionary": [],
"identification": {
"idType": "Custom",
"id": "https//example.com/aas/0"
},
"idShort": "test",
"dataSpecification": [],
"modelType": {
"name": "AssetAdministrationShell"
},
"asset": {
"identification": {
"idType": "Custom",
"id": "https//example.com/asset/0"
},
"idShort": "test_asset0",
"kind": "Instance",
"dataSpecification": [],
"modelType": {
"name": "Asset"
},
"embeddedDataSpecifications": []
},
"embeddedDataSpecifications": [],
"views": [],
"submodels": []
}- A User add a Submodel (idShort: test_sm1) to a AAS (ID: https//example.com/aas/0).
API operation:PUT /aasServer/shells/https%2F%2Fexample.com%2Faas%2F0/aas/submodels/test_sm1
request json
{
"parent": {
"keys": [
{
"idType": "Custom",
"type": "AssetAdministrationShell",
"value": "https//example.com/aas/0",
"local": true
}
]
},
"identification": {
"idType": "Custom",
"id": "https//example.com/submodel/1"
},
"idShort": "test_sm1",
"kind": "Instance",
"dataSpecification": [],
"modelType": {
"name": "Submodel"
},
"embeddedDataSpecifications": [],
"submodelElements": [
{
"parent": {
"keys": [
{
"idType": "Custom",
"type": "Submodel",
"value": "https//example.com/submodel/1",
"local": true
}
]
},
"identification": {
"idType": "Custom",
"id": "https//example.com/submodelelement/0"
},
"idShort": "test_element0",
"kind": "Instance",
"valueType": "integer",
"modelType": {
"name": "Property"
},
"value": 12347
}
]
}
- A User change a AAS's idShort property (ID: https//example.com/aas/0) based on procesure 1. But, submodels property is empty because of calling AAS GET API before calling Submodel PUT API.
API operation:PUT /aasServer/shells/https%2F%2Fexample.com%2Faas%2F0
request json
{
"conceptDictionary": [],
"identification": {
"idType": "Custom",
"id": "https//example.com/aas/0"
},
"idShort": "hoge",
"dataSpecification": [],
"modelType": {
"name": "AssetAdministrationShell"
},
"asset": {
"identification": {
"idType": "Custom",
"id": "https//example.com/asset/0"
},
"idShort": "test_asset0",
"kind": "Instance",
"dataSpecification": [],
"modelType": {
"name": "Asset"
},
"embeddedDataSpecifications": []
},
"embeddedDataSpecifications": [],
"views": [],
"submodels": []
}- User cannot access a submodel (idShort: test_sm1) data.
API Operation:GET /aasServer/shells/https%2F%2Fexample.com%2Faas%2F0/aas/submodels/test_sm1/submodel
Metadata
Metadata
Assignees
Labels
No labels