Add `snapshot_memory_buffer_size_in_bytes` config
Add a new config to the replication section called snapshot_memory_buffer_size_in_bytes (plus add it to the table mapping, similar to the initial_data_snapshot_threads_per_table config). We have a global setting called memory_buffer_size_in_bytes which applies to the replication loop (single goroutine) and applies to the snapshot loops (configurable, multiple goroutines).
In case we have a large memory_buffer_size_in_bytes, the snapshot manager might use N x memory_buffer_size_in_bytes memory which can cause very high memory usage. The idea is to introduce a separate config the snapshot goroutines so we can keep the memory usage under control.
Possible configuration:
- memory buffer: 10 mb (replication)
- snapshot: 5 goroutines
- snapshot buffer: 2 mb (so 10mb total)