You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ScanInternal API allow the caller to scan the internal keys within the
engine. Because these internal scans require maintaining additional state,
these scans are backed by a separate 'scanInternalIterator' type. This commit
bundles this along with iterAlloc into a new pooled scanInternalIterAlloc
struct.
The inclusion of the scanInternalIterator struct avoids that allocation, but
more importantly, the separate pool prevents ScanInternal from sharing objects
with ordinary Iterators. The different access patterns of ScanInternal and
Iterators can yield different buffer sizes. Since the code paths are separate,
code drift can accidentally result in discarding buffers when returning an
iterAlloc for reuse. Using separate pools sidesteps these concerns.
0 commit comments