-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Aggregation Framework, Internal Code
-
Labels:None
-
Query Execution
-
Fully Compatible
We currently store NUL bytes at the end of the keys in a Document and anything that uses string-like storage in Value, even though in both cases we also store explicit lengths both for efficency and in the case of Value to correctly handle embedded NUL bytes in the middle of the string. This dates to a brief period when StringData required that str[size] was valid and pointed to a NUL byte. Since this is no longer the case, we should stop storing them. This will allow storing longer strings (up to 14 bytes from 13) inline in Value, and should reduce the size of Documents by reducing the probability that we need to skip bytes so the next Value will be properly aligned.