Do not overcommit Buffer memory usage

During INSERT the check against existing rows and rows from the INSERT
block is performed and if they exceeded threshold the Buffer should be
flushed to avoid overcommit, while before this patch the second check
(in flushBuffer()) will ignore rows from INSERT block.
This commit is contained in:
Azat Khuzhin 2019-12-23 01:35:53 +03:00
parent 8711f98c30
commit 58055e6a94

View File

@ -402,7 +402,7 @@ private:
* an exception will be thrown, and new data will not be added to the buffer. * an exception will be thrown, and new data will not be added to the buffer.
*/ */
storage.flushBuffer(buffer, true, true /* locked */); storage.flushBuffer(buffer, false /* check_thresholds */, true /* locked */);
} }
if (!buffer.first_write_time) if (!buffer.first_write_time)