Closed alexradzin closed 4 years ago
If the performance impact is minimal, we will include this pull request in the next release.
If the performance impact is minimal, we will include this pull request in the next release.
IMHO the performance will be even better because now the null check is done only once.
This pull request missed today's 4.4.16 release. We will include it in the upcoming 4.4.17 release next week.
Version 4.4.17 is released with this pull request.
This is done in order to preserve bins order on read, so client returns bins in the same order as they have been written.
The problem is that bins read from the database are stored in
HashMap
that is in turn passed to constructor ofRecord
.HashMap
does not preserve order of keys, so the bins retrieved from the record in "random" order. This does not happen in case of clients written in other languages (e.g. python) where map stores keys in order the same order they have been passed.LinkedHashMap
behaves likeHashMap
when retrieving values by key, but returns keys in the same order as they were inserted.