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:

  1. In a clustered environment, with concurrent transactions taking place and default tx isolation level repeatable read, it was the cause of continuous deadlocks.

  2. 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.

Environment

None

Activity

Show:
Fixed

Details

Assignee

Reporter

Components

Fix versions

Priority

Created June 4, 2019 at 7:49 AM
Updated June 4, 2019 at 7:50 AM
Resolved June 4, 2019 at 7:50 AM

Flag notifications