upb-uc4 / lagom-core

Repository for the micro service backend using lagom.
Apache License 2.0
6 stars 0 forks source link

Validation Timeout for course creation #409

Closed bastihav closed 3 years ago

bastihav commented 3 years ago

Describe the bug Validation timeout when trying to create a course with multiple moduleIds.

To Reproduce Steps to reproduce the behavior:

{
    "courseId": "",
    "moduleIds": [
        "M.1278.15686",
        "M.1275.01159"
    ],
    "courseName": "Analysis",
    "courseType": "Lecture",
    "startDate": "2020-12-08",
    "endDate": "2020-12-08",
    "ects": 10,
    "lecturerId": "lecturer",
    "maxParticipants": 100,
    "currentParticipants": 0,
    "courseLanguage": "German",
    "courseDescription": "Death of a lot of computer scientists"
  }

Expected behavior Don't die

ldklenner commented 3 years ago

The validation timeout in addCourse is to short for a database access fetching multiple modules . Database timeout was usually set to 5000 milliseconds. There is also an overlooked Todo annotation.

dhelmert commented 3 years ago

Same issue for AddUser in UserService; the validationFuture depends on a getAllUsers call. This caused a timeout to occur at least once before, the new timeout is needed here as well