-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix potential huge allocations when reading TermsQueryBuilder.BinaryV…
…alues from the network (#105235) We should be reading a single `BytesReference` (that would be backed by a single large `byte[]`) here when we care about the individual values in the list only. Without breaking the behavior of only serializing once when sending to multiple targets this change: * lazy serializes as needed and keeps the original terms, so we don't needlessly go through serialization in e.g. a single node situation or or requests that are handled on the coordinator directly (concurrency should be fine here, we serialize on the same thread in practice and should we ever not be on the same thread at all times this will worst case lead to serializing multiple times). * stops allocating a potentially huge byte[] when receiving these things over the wire
- Loading branch information
1 parent
ffc711b
commit 8e42535
Showing
1 changed file
with
36 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters