BugZero found this defect 34 days ago.
Data sources
All data on this page is proprietary to BugZero® or gathered from public sources
4/15/2024
MongoDB Server
No affected releases provided.
No fixed releases provided.
The window stage estimates the memory Y that a window frame of size X will need using linear regression and the formula Y = aX + b. It computes the coefficients a and b incrementally sampling the documents that are added in the window. Every time a new document is added in the window the estimated memory is computed and compared against a threshold. The reason the formula gives negative values is that the samples it considers have the size of the frame (i.e the total number of documents) but the memory of the last seen document only. When the memory of the new documents is smaller than the memory of the previous documents then the memory and the window frame size are seen to be reverse proportional, i.e. the window frame increases and the memory decreases, and the linear regression formula gives negative results. The formula should be adjusted to consider in each sample the frame size and the memory of all the documents in the frame size.