eclipsesource / eclipsesource/uml-glsp
Ensure thread-safety of ModelServer Component
- Dominant language
- Java
- Stars
- 12
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
As mentioned in PR #1 , we should consider adding some thread-safety to the ModelServer at some point, similar to what was done for the GLSP ActionDispatcher, as a lot of these errors appear when moving nodes quickly:
```
16:23:24.580 [qtp2062888647-42] WARN io.javalin.Javalin - Uncaught exception
java.util.ConcurrentModificationException: null
at org.eclipse.emf.common.util.AbstractEList$EIterator.checkModCount(AbstractEList.java:751)
at org.eclipse.emf.common.util.AbstractEList$EIterator.doNext(AbstractEList.java:699)
at org.eclipse.emf.common.util.AbstractEList$EIterator.next(AbstractEList.java:685)
at org.eclipse.emf.ecore.change.util.ChangeRecorder.consolidateChanges(ChangeRecorder.java:228)
at org.eclipse.emf.ecore.change.util.BasicChangeRecorder.endRecording(BasicChangeRecorder.java:117)
at org.eclipse.emfcloud.modelserver.emf.common.RecordingModelResourceManager.executeCommand(RecordingModelResourceManager.java:45)
at org.eclipse.emfcloud.modelserver.emf.common.DefaultModelResourceManager.execute(DefaultModelResourceManager.java:348)
at org.eclipse.emfcloud.modelserver.emf.common.DefaultModelRepository.executeCommand(DefaultModelRepository.java:137)
at org.eclipse.emfcloud.modelserver.emf.common.DefaultModelController.executeCommand(DefaultModelController.java:273)
at org.eclipse.emfcloud.modelserver.emf.common.ModelServerRoutingV1.lambda$37(ModelServerRoutingV1.java:206)
at java.base/java.util.Optional.ifPresentOrElse(Optional.java:201)
at org.eclipse.emfcloud.modelserver.emf.common.ModelServerRoutingV1.executeCommand(ModelServerRoutingV1.java:205)
at io.javalin.core.security.SecurityUtil.noopAccessManager(SecurityUtil.kt:22)
at io.javalin.http.JavalinServlet$addHandler$protectedHandler$1.handle(JavalinServlet.kt:139)
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the ModelServer command path, especially ModelServerRoutingV1.executeCommand, DefaultModelController.executeCommand, and RecordingModelResourceManager.executeCommand, and compare the thread-safety approach used for the GLSP ActionDispatcher. Reproduce the issue by moving nodes quickly and verify that concurrent commands no longer produce the shown ConcurrentModificationException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100