Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
master
-
None
Description
- What?
Following openpaas-1.7.15-rc2 deployment, and the use of VAVR immutable datastructures in UidMsnConverter, I notice some offending slow FETCH requests.
A closer look shows Cassandra is not to blame here
Flame graphs correlate the analysis
On our prod set up 40k messages are enough to trigger endless FETCHs.
- Why ?
Fetch is calling getMSN(uid) one by one.
Previous code was "getMSN optimized" as it uses an array as the underlying data structure. O(1) upon reads * n messages.
The later code uses a red-black tree as an underlying data structure. I'm usure about the complexity here (because I am not a VAVR expert) but it is at least O(log n) * n messages.
- Short term reaction
Revert uneeded changes added in UidMsnConverter as part of work on JAMES-3177.