Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
Improve concurrency and performance of conversation log history.
Description
Use SequenceManager to assign the next messageID in ofMucConversationLog, instead of using select count(*) as part of the insert query, to solve 2 issues:
In a clustered environment, with concurrent transactions taking place and default tx isolation level repeatable read, it was the cause of continuous deadlocks.
If a process to remove old conversation logs is set up, having count(*) as messageID would lead to duplicates.
Instead of inserting conversation logs message by message, they're stored in batches as part of a single db transaction, to improve performance.
Use SequenceManager to assign the next messageID in ofMucConversationLog, instead of using select count(*) as part of the insert query, to solve 2 issues:
In a clustered environment, with concurrent transactions taking place and default tx isolation level repeatable read, it was the cause of continuous deadlocks.
If a process to remove old conversation logs is set up, having count(*) as messageID would lead to duplicates.
Instead of inserting conversation logs message by message, they're stored in batches as part of a single db transaction, to improve performance.