-
Bug
-
Resolution: Done
-
Medium
-
Istanbul Release
-
None
Expected behaviour:
- Concurrent requests to create schema sets for the same yang model are handled in the same way the same requests sent sequentially are.
Actual behaviour:
- Some concurrent requests might fail with Internal Server Error
Steps to reproduce:
1. Create a dataspace:
curl -X POST 'http://localhost:8080/cps/api/v1/dataspaces?dataspace-name=bsa-dataspace-7' \-H 'Authorization: Basic Y3BzdXNlcjpjcHNyMGNrcyE='
2. Create 2 schema sets concurrently with attached bookstore.yang (ensure that yang resources does not exist yet for this model)
curl -X POST 'http://localhost:8080/cps/api/v1/dataspaces/bsa-dataspace-7/schema-sets' \ -H 'Authorization: Basic Y3BzdXNlcjpjcHNyMGNrcyE=' \ -F 'file=@"bookstore.yang"' \ -F 'schema-set-name="bsa-schema-set-1"' & \ curl -X POST 'http://localhost:8080/cps/api/v1/dataspaces/bsa-dataspace-7/schema-sets' \ -H 'Authorization: Basic Y3BzdXNlcjpjcHNyMGNrcyE=' \ -F 'file=@"bookstore.yang"' \ -F 'schema-set-name="bsa-schema-set-2"'
Then, http response for one of the 2 requests could be:
{ "status":"500 INTERNAL_SERVER_ERROR", "message":"could not execute statement; SQL [n/a]; constraint [yang_resource_checksum_key]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement", "details":"Check logs for details." }
See error.log for the logs
- relates to
-
CPS-493 Rename 'CpsModulePersistenceServiceUnitSpec' with 'CpsModulePersistenceServiceSpec'
- Closed