Constant mz_stash::INSERT_BATCH_SPLIT_SIZE
source · pub const INSERT_BATCH_SPLIT_SIZE: usize = _; // 2_097_152usize
Expand description
The limit AFTER which to split an update batch (that is, we will ship an update that exceeds this number, but then start another batch).
Cockroach’s default limit for sql.conn.max_read_buffer_message_size is 16MiB https://github.com/cockroachdb/cockroach/blob/7e4e0b195cd61da6cd7a719a5b9aa2e84f68d475/pkg/sql/pgwire/pgwirebase/encoding.go#L50. Use a number well under that but still big ish that most things won’t ever need to batch. Because we are only estimating the value size and ignoring various other things that contribute to the total pgwire message size, having a 14MiB headspace seems safe here.