Details
-
Bug
-
Resolution: Unresolved
-
Major
-
6.5.0
Description
Collatejson encode/decode algorithms require temporary buffer to be passed by the caller. The size of these buffers should be enough to hold the intermediate data structures.
Historically (3 * size of index key) was known to be enough but in some corner cases, this proved to be insufficient. (Note: At some places (all?), collatejson code internally uses append to avoid index out of bound error. But this will affect scan response time).
There is a need to
1. Introduce a better constant (may be 6), such that temporary buffer size will be enough.
2. Introduce a setting to modify this constant to a higher value (if data set has such requirement).
3. Reuse the resized buffer (wherever required)
4. consolidate all large buffer resize code into one place and reuse the same across
5. If resized buffer is not enough, retry with bigger buffer
Attachments
Gerrit Reviews
For Gerrit Dashboard: MB-31804 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
116011,1 | MB-31804: Expand buffer only in DATA_ENC_JSON mode | unstable | indexing | Status: MERGED | +2 | +1 |
116087,4 | MB-31804: Add retry in callers of code2n1ql collatejson method | unstable | indexing | Status: MERGED | +2 | +1 |