[MGNLPER-208] Test and document times for queries that are executed concurrently Created: 26/Jul/23  Updated: 09/Aug/23  Resolved: 09/Aug/23

Status: Closed
Project: Periscope
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Ilgun Ilgun Assignee: Miguel Martinez
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Cloners
clones MGNLPER-165 Search queries are not executed concu... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Epic Link: [JCR] Search Performance issues
Story Points: 8
Team: AuthorX
Work Started:
Approved:
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 
  • 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


Generated at Mon Feb 12 10:29:47 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.