ENG-6361

...nt

Don't merge. Also bypass the bug of ENG-6517 by using inequality checking instead of equality checking.

Still need to discuss on the test case which indicates the peak memory usage is larger than the "current" memory usage.
Missed one: warehousedata -> m_warehousedata.