Details
-
Bug
-
Resolution: Fixed
-
Critical
-
4.5.0, 4.5.1, 4.6.0
-
None
-
Untriaged
-
No
Description
In array indexing, buffers are used for splitting the array key, exploding composite index and other operations. The exact operations in which this buffer is used are:
1. This buffer is used in exploding an encoded composite key into individual encoded keys
buffer size should be atleast 3x of encoded composite key
2. This buffer is also used in exploding one single array (the array key of the array index) into individual array elements
buffer size should be atleast 3x of encoded array that needs to be exploded.
3. This buffer is also used in forming set of array items after cartesian product.
buffer size should be atleast sum of lengths of array items to be indexed.
There are checks for buffer size for #2 and #3.
For #1, buffer size should be atleast three times that of encoded composite key. The fix is to have maxArrayIndexEntrySize factor in this requirement. Also, there should be a size check to see if buffer size > 3 * length of encoded key in slice writers and error out if not instead of crashing.
If the user has set the setting correctly to take care of #3, then #1 should be already handled. However, the size check has to be in place to avoid the crashing.
Attachments
For Gerrit Dashboard: MB-22081 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
78511,2 | MB-22081: Fix panic in collatejson ExplodeArray | unstable | indexing | Status: MERGED | +2 | +1 |