You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sources read data in and collect it up into batches. Batches are flushed
based on configurable criteria: until now this has been the number of
records collected and how long they have been waiting.
This commit adds another criteria for flushing, based on the memory
usage of the records. `source-batch-max-bytes`, disabled by default,
allows triggering flushing when a certain amount of data has been
collected.
This new feature enables two useful behaviours:
1) Large records: reduce the risk of OOMs when memory-constrained
2) Small records: create larger, more-efficient batches
Memory usage is estimated based on input bytes, rather than by
instrumenting Arrow buffer memory.
Ideally we would implement this based on Arrow buffer usage. However,
Arrow's `ArrayBuilder` trait doesn't expose memory size and we would
need to maintain a lot of code ourselves to make it work. I think it's
reasonable to use input bytes as an approximation.
0 commit comments