[CONTROLLER-2013] Improve closedTransactions storage in FrontendHistoryMetadata Created: 06/Nov/21 Updated: 11/Nov/21 Resolved: 11/Nov/21 |
|
| Status: | Resolved |
| Project: | controller |
| Component/s: | clustering |
| Affects Version/s: | None |
| Fix Version/s: | 3.0.13, 4.0.7, 2.0.10 |
| Type: | Improvement | Priority: | Medium |
| Reporter: | Robert Varga | Assignee: | Robert Varga |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
We are currently using an ImmutableMap<UnsignedLong, Boolean>, which allocates two arrays and forces us to use UnsignedLong instances. We should be able to get by with storing a sorted List of Entry<long, boolean> and provide same facilities for a much smaller price. |
| Comments |
| Comment by Robert Varga [ 08/Nov/21 ] |
|
This ends up using a long[] and boolean[], which offer best memory density. These are sorted by the UnsignedLong's value, hence are amenable to being extended for searching, if that need ever arises. |