Details
-
Improvement
-
Resolution: Done
-
Neutral
-
None
-
None
-
-
Empty show more show less
-
Yes
-
Yes
-
8
-
Yes
Description
Customers think we don't do concurrent execution of the search queries, and hence, users need to wait for other users to finalise their search.
At 19:00 minute of the recording: https://magnolia-cms.zoom.us/rec/share/Fkd9YuJdMIyisdTwKIDZh7MDGe3GcKMNWEsXT-1u1mLKsx8-EM65JoiBDhChZfFx.DVTpqAofUU7BsisO
AC:
- Investigate previous discovery and either confirm/infirm the following statement: "Multiple threads trying to get the same session on the same workspace will give you badtimes (IIRC throws an exception on the second thread)."
- If possible, remove the Semaphore lock, and make the concurrency configurable
- Measure and record the times before the change and after the change in this ticket using the big data environment: https://www.notion.so/magnoliacms/Monitoring-and-tracking-metrics-d6c3037f7a584aa79911ecaf3d3bd22f
- During investigation, fill MGNLPER-190 as needed
Dev notes: source stackOverflow
- javax.jcr.Session is not thread-safe, so if you're going to use a Session to handle multiple requests, you have to be sure that a Session is only being used in processing one request at a time. In other words, you'd some sort of pool of Sessions objects.
- Session is stateful, so any information loaded by one session might be kept until the Session is refreshed or closed.
- Session is for a specific user. If each incoming request might be associated with different users, you may be leaking privileges and data.
Other notes: https://jackrabbit.apache.org/jcr/concurrency-control.html
Checklists
Attachments
Issue Links
- caused by
-
MGNLPER-77 Make sure JCR search and multiple threads play well together
-
- Closed
-
- is cloned by
-
MGNLPER-208 Test and document times for queries that are executed concurrently
-
- Closed
-
- is related to
-
MGNLPER-168 JcrSearchResultSupplier generates inefficient queries
-
- Closed
-
-
MGNLPER-190 Find and document opportunities to improve the response time of periscope
-
- Open
-
- to be documented by
-
MGNLPER-202 DOC: Enhancements to asynchronicity of search queries
-
- Closed
-