-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Configurable batch size and max wait limit for targets #1876
Open
BuzzCutNorman
wants to merge
97
commits into
meltano:main
Choose a base branch
from
BuzzCutNorman:1626-configurable-batch-size-and-max-wait-limit-for-targets
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
97 commits
Select commit
Hold shift + click to select a range
11c56e3
add _perftimer file to helpers folder
BuzzCutNorman 550ecff
add sink_timer, batch_size_rows, and batch_wait_limit_seconds
BuzzCutNorman 68c3484
calcuation fix
BuzzCutNorman 66f750e
correct class hint for sink_timer
BuzzCutNorman 62c2c32
mypy fixes round 1
BuzzCutNorman 541a46d
mypy fixes round 2
BuzzCutNorman 028e3d9
Merge branch 'main' into 1626-configurable-batch-size-and-max-wait-li…
BuzzCutNorman 4309c8e
Merge branch 'main' of https://github.com/meltano/sdk into 1626-confi…
BuzzCutNorman dc2a2d8
Merge branch 'main' into 1626-configurable-batch-size-and-max-wait-li…
BuzzCutNorman 01f4539
Merge branch 'main' into 1626-configurable-batch-size-and-max-wait-li…
BuzzCutNorman 8a591c1
simple tests for PerfTimer and BatchPerfTimer
BuzzCutNorman eb6c9e7
clear _stop_time after lap is calculated
BuzzCutNorman f6bbf0c
wider variation when testing perftimer lap_time
BuzzCutNorman 74b1653
Apply suggestions from code review
BuzzCutNorman bb0c8fb
Merge branch 'main' into 1626-configurable-batch-size-and-max-wait-li…
BuzzCutNorman c151f84
comment out batch timer additions
BuzzCutNorman 49c014c
add BatchPerfTimer and supporting properties
BuzzCutNorman a425774
add BatchTimer start and finish to drain_one
BuzzCutNorman 379f814
remove commented out code
BuzzCutNorman 0303f25
change perf_diff_allowed_max to .25 better
BuzzCutNorman 1fa9752
update test match perf_diff_allowed_max change
BuzzCutNorman d2db4fb
added tests for batch_size_rows and max_size
BuzzCutNorman 99a9fb5
add batch_wait_limit_seconds tests
BuzzCutNorman 059c392
added _lap_manager
BuzzCutNorman 7ac5a6c
calling _lap_manager in drain_one
BuzzCutNorman 0420db8
mypy fix: moved sink_timer check into _lap_manager
BuzzCutNorman 4b5b3c6
Merge branch 'main' into 1626-configurable-batch-size-and-max-wait-li…
BuzzCutNorman 1aec608
Apply suggestions from code review
BuzzCutNorman b5e93a6
added batch_wait_limit_seconds value test
BuzzCutNorman 57b7f37
add tests for new settings
BuzzCutNorman f5874c9
BATCH_SIZE_ROWS_CONFIG added
BuzzCutNorman 3b73e64
BATCH_WAIT_LIMIT_SECONDS_CONFIG added
BuzzCutNorman b48f3d0
move logging and update formatting.
BuzzCutNorman 6c465f7
Merge branch 'main' into 1626-configurable-batch-size-and-max-wait-li…
edgarrmondragon 3cee381
add pertimer on_the_clock tests
BuzzCutNorman 7025280
add batchperftimer is_too_old tests
BuzzCutNorman 8bbb346
add PerfTimer.on_the_clock()
BuzzCutNorman fd8f171
add BatchPerfTimer.is_too_old
BuzzCutNorman 2cfa516
add Sink.is_too_old tests
BuzzCutNorman da2808a
added property Sink.is_too_old
BuzzCutNorman 01962e0
remove is_too_old tests
BuzzCutNorman c89fd74
move is_too_old to Sink
BuzzCutNorman 2f51fd4
Add is_too_old drain to _process_record_message
BuzzCutNorman bf582e0
fix AttributeError NoneType has no start_time
BuzzCutNorman 01705c6
remove counter_based_max_size and logging
BuzzCutNorman 29ae3de
clean up test_batch_wait_limit_seconds
BuzzCutNorman 1b5cc6a
update test for batch_dynamic_managment
BuzzCutNorman 3d19a03
BatchPerfTimer take in a max and internally sink_max_size internally
BuzzCutNorman 50d00c2
add batch_dynamic_management to Sink
BuzzCutNorman fb5d6f2
updated perf_diff tests to utilize allowed min and max
BuzzCutNorman e574003
add call to counter_based_max_size and logging to _lap_manager
BuzzCutNorman 7f48881
expand is_full to utilize sink_timer.sink_max_size
BuzzCutNorman 7a54c69
Merge branch 'main' into 1626-configurable-batch-size-and-max-wait-li…
BuzzCutNorman 1261c04
mypy fixes
BuzzCutNorman 0436a74
added defualt for when only batch management is set
BuzzCutNorman b92d8c1
add about_info test for batch_dynamic_management
BuzzCutNorman f78cc0a
added batch_dynamic_management to capabilities
BuzzCutNorman ec57105
add batch_dynamic_management to config if missing
BuzzCutNorman 68a520c
add and or update tests for updated is_full utilizing _drain_function
BuzzCutNorman b36acf8
update is_full to utilize _drain_function and set_drain_function and …
BuzzCutNorman 933fa21
remove is_too_old check from _process_record_message and update is_fu…
BuzzCutNorman c342e44
mypy fixes
BuzzCutNorman 9ce87da
update docs implementation index to include target_batch_full
BuzzCutNorman af84ecd
Merge branch 'main' into 1626-configurable-batch-size-and-max-wait-li…
edgarrmondragon 31f6ef5
Merge branch 'main' into 1626-configurable-batch-size-and-max-wait-li…
edgarrmondragon 9dae576
Merge branch '1626-configurable-batch-size-and-max-wait-limit-for-tar…
BuzzCutNorman b2697ee
added documentation for updated is_full and associated new functions
BuzzCutNorman e874f73
Merge branch 'main' into 1626-configurable-batch-size-and-max-wait-li…
BuzzCutNorman f36a79f
Merge branch '1626-configurable-batch-size-and-max-wait-limit-for-tar…
BuzzCutNorman 2952513
edits to target batch full documentation
BuzzCutNorman c79cf64
Merge branch 'main' into 1626-configurable-batch-size-and-max-wait-li…
BuzzCutNorman 4f75636
Merge branch '1626-configurable-batch-size-and-max-wait-limit-for-tar…
BuzzCutNorman 879995a
removed cached_property decorator from max_size
BuzzCutNorman 1c81669
Edits and formatting changes.
BuzzCutNorman 7a1df1d
Merge branch 'main' into 1626-configurable-batch-size-and-max-wait-li…
edgarrmondragon c804b76
further edits and formatting
BuzzCutNorman 648656b
Merge branch '1626-configurable-batch-size-and-max-wait-limit-for-tar…
BuzzCutNorman dc8481d
Merge branch 'main' into 1626-configurable-batch-size-and-max-wait-li…
BuzzCutNorman ffabffa
Apply suggestions from code review
BuzzCutNorman 50e82ae
Apply suggestion from code review
BuzzCutNorman f977ca2
Merge branch 'main' of https://github.com/BuzzCutNorman/sdk into 1626…
BuzzCutNorman b2181e7
Merge branch 'main' into 1626-configurable-batch-size-and-max-wait-li…
BuzzCutNorman 484c7cb
Merge branch 'main' into 1626-configurable-batch-size-and-max-wait-li…
BuzzCutNorman 2a870af
Merge branch 'main' of https://github.com/BuzzCutNorman/sdk into 1626…
BuzzCutNorman fd787f2
Merge branch 'main' into 1626-configurable-batch-size-and-max-wait-li…
BuzzCutNorman e159ae6
Merge branch 'main' into 1626-configurable-batch-size-and-max-wait-li…
BuzzCutNorman 7c4756c
added return type annotations to start_time, stop_time, and lap_time
BuzzCutNorman e50f1a2
resolve mypy unsupported operand types error
BuzzCutNorman f4c2c38
Merge branch 'main' into 1626-configurable-batch-size-and-max-wait-li…
BuzzCutNorman 5c1b5ea
change private Sink._lap_manager() to public Sink.lap_manager()
BuzzCutNorman 39dd6e7
Merge branch 'main' of https://github.com/BuzzCutNorman/sdk into 1626…
BuzzCutNorman ab2782d
added settings to default_settings in test_target_about_info
BuzzCutNorman d06481d
Merge branch 'main' into 1626-configurable-batch-size-and-max-wait-li…
BuzzCutNorman 295802f
Merge branch 'main' into 1626-configurable-batch-size-and-max-wait-li…
BuzzCutNorman 17f143c
Merge branch 'main' into 1626-configurable-batch-size-and-max-wait-li…
BuzzCutNorman a0e34c9
Merge branch 'main' of https://github.com/BuzzCutNorman/sdk into 1626…
BuzzCutNorman 49a64e6
Merge branch 'main' into 1626-configurable-batch-size-and-max-wait-li…
BuzzCutNorman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Target: Batch Full | ||
|
||
The SDK automatically handles creating and releasing properly sized batches. | ||
|
||
## The Basics | ||
|
||
A Tap sends records messages to the Target. Those messages are deserialized and sent to the Target method `_process_record_message`. After each record is processed, one question is asked: | ||
|
||
> Is the batch full? (see [`Sink.is_full`](singer_sdk.Sink.is_full)) | ||
|
||
If the answer is `True`, then the records currently held in the `Sink._pending_batch` dict are drained. The drain process is managed by the `Target.drain_one` method. Records get written, counters get reset, and on to filling the next batch with records. | ||
|
||
## How a Batch is Measured and "Full" is Defined | ||
|
||
You need to know three things to determine if something is full | ||
|
||
1. The unit of measure | ||
2. The level at which an object is determined full | ||
3. The current measurement of the object | ||
|
||
The units of measure used with `Sink._pending_batch` are **rows** and **time** in **seconds**. The full level marks come from the Meltano Target configuration options of `batch_size_rows`, `batch_wait_limit_seconds`. If the configuration options are not present, the defined constants of `MAX_SIZE_DEFAULT` and `WAIT_LIMIT_SECONDS_DEFAULT` are used. How is `Sink._pending_batch` measured? To measure **rows**, the count of records read from the Tap is used. The current row count is available via the property `Sink.current_size`. To measure **seconds**, a batch timer is utilized. | ||
|
||
There are four “is full” scenarios and each one has a function that looks at the current batch and returns `True` if it is full or `False` if the batch can take more records. | ||
|
||
1. Row limit has been reached. `Sink.is_full_rows` | ||
2. Wait limit is seconds has been reached. `Sink.is_too_old` | ||
3. Row limit or Wait limit is seconds has been reached. `Sink.is_full_rows_and_too_old` | ||
4. Row limit managed by the batch timer has been reached. `Sink.is_full_dynamic` | ||
|
||
Based on the Meltano Target configuration option(s), `Sink.set_drain_function` sets the `_drain_function` attribute to the appropriate method. This method is then called in `Sink.is_full` at the end of each Target method `_process_record_message` cycle. When `Sink.is_full` is checked and returns `True` the message: | ||
``` | ||
"Target sink for [Stream Name] is full. Current size is [Current Size]. Draining...", | ||
``` | ||
|
||
is logged to the console and `Target.drain_one(Sink)` is called. | ||
|
||
## Explanation of the Four "is full" Scenarios | ||
|
||
### Rows limit has been reached (`Sink.is_full_rows`) | ||
|
||
To know if something is full you need to know how much it currently holds and at what point to consider it full. Sinks have the property `current_size` which gives you the number of records read and placed into the pending batch. The `current_size` gives us how much the current batch is holding. Now that we know the `current_size` we need to determine if the current size is considered full. The Sink property of `max_size` gives us the integer that defines the full mark. The property `max_size` returns the Sink’s internal variable `_batch_size_rows` if not `None` or the `DEFAULT_MAX_SIZE` constant which is `10000`. | ||
|
||
Both the `Sink.current_size` and `Sink.max_size` are used to calculate the `bool` value returned by the property `Sink.is_full`. If `Sink.current_size` is greater than or equal to `Sink.max_size` the batch is full and `Sink.is_full` would return `True`. When `Sink.is_full` is checked at the end of `Target._process_record_message` and returns `True` the message "Target sink for 'stream_name' is full. A log message is emitted to stderr and `Target.drain_one(Sink)` is called. | ||
|
||
### Wait limit in seconds has been reached (`Sink.is_too_old`) | ||
|
||
To know if something is too old you need to know how much time has passed and how much time needs to pass to be considered old. When the Meltano Target configuration option of `batch_wait_limit_seconds` is present and set, the internal variable `_sink_timer` is initialized with an instance of the `BatchPerfTimer` class. The `BatchPerfTimer` class is a batch-specific stopwatch. The timer is accessible via the property [`Sink.sink_timer`](singer_sdk.Sink.sink_timer). Right after the timer is initialized, the stopwatch is started with `Sink.sink_timer.start()`. We can see how much time has passed by running `Sink.sink_timer.on_the_clock()`. The property `Sink.batch_wait_limit_seconds` indicates how much time needs to pass for a batch to be considered old. | ||
|
||
Both the `Sink.sink_timer.on_the_clock()` method and the `Sink.batch_wait_limit_seconds` attribute are used to calculate the boolean value returned by [`Sink.is_too_old`](singer_sdk.Sink.is_too_old). If `Sink.sink_timer.on_the_clock()` is greater than or equal to `Sink.batch_wait_limit_seconds`, the batch is considered full and `Sink.is_full` would return `True`. Again, a log message is emitted to stderr and `Target.drain_one(Sink)` is called. The [`Target.drain_one(Sink)`](singer_sdk.Target.drain_one) method calls `Sink._lap_manager`, which stops the timer, calculates the lap time, and restarts the timer. | ||
|
||
### Rows or Wait limit has been reached (`Sink.is_full_rows_and_too_old`) | ||
|
||
The previously described `is_full_rows` and `is_too_old` methods are run and their results are held in a tuple. If `True` is present in the tuple the function returns `True` so `is_full` will return `True`. When `Sink.is_full` is checked at the end of `Target._process_record_message` and returns `True` a log messages is emitted to stderr and [`Target.drain_one(Sink)`](singer_sdk.Target.drain_one) is called. The [`Target.drain_one(Sink)`](singer_sdk.Target.drain_one) method calls `Sink._lap_manager` which stops the timer, calculates the lap time, and restarts the timer. | ||
|
||
### Rows limit managed by `Sink.sink_timer.counter_based_max_size` has been reached. `Sink.is_full_dynamic` | ||
|
||
When the Meltano Target configuration option `batch_dynamic_management` is set to `True` you are asking the `Sink.sink_timer` to find the maximum rows is full mark that keeps the time to fill a batch with records and write those records to the Target's target within the time in seconds given. | ||
|
||
The `Sink.sink_timer` is passed the given `batch_size_rows` or the `DEFAULT_MAX_SIZE` constant which is `10000` if it is `None` and is also passed the given `batch_wait_limit_seconds` if present or the `WAIT_LIMIT_SECONDS_DEFAULT` constant which is `30` if it is `None`. Internally the `rows` passed turns into `Sink.sink_timer.SINK_MAX_SIZE_CEILING` which is the max size a batch can reach. The `time` in `seconds` passed turns into `Sink.sink_timer.max_perf_counter` which is the time in seconds a full cycle should take. The attribute `Sink.sink_timer.sink_max_size` starts at a predefined size of `100`. During the `Target.drain_one(Sink)` process `Sink._lap_manager` is called and the timer method `counter_based_max_size` runs and checks if `Sink.sink_timer.perf_diff`, which is `max_perf_counter` - `lap_time`, is greater than `Sink.sink_timer.perf_diff_allowed_max` or less than `Sink.sink_timer.perf_diff_allowed_min`. If `Sink.sink_timer.perf_diff` is greater than `Sink.sink_timer.perf_diff_allowed_max` the `Sink.sink_timer.sink_max_size` is increased as long as the `Sink.sink_timer.sink_max_size` is less than `Sink.sink_timer.SINK_MAX_SIZE_CEILING`. If `Sink.sink_timer.perf_diff` is less than `Sink.sink_timer.perf_diff_allowed_min` the `Sink.sink_timer.sink_max_size` is reduced. If the `Sink.sink_timer.perf_diff` is between `Sink.sink_timer.perf_diff_allowed_max` and `Sink.sink_timer.perf_diff_allowed_min` no correction to `Sink.sink_timer.sink_max_size` is made since the optimal rows size has been reached. This process is repeated when each `Sink` is initialized and starts processing records. | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
"""Performance timers which deal with dynamic timing events.""" | ||
|
||
from __future__ import annotations | ||
|
||
import time | ||
|
||
|
||
class PerfTimerError(Exception): | ||
"""A custom exception used to report errors in use of BatchPerfTimer class.""" | ||
|
||
|
||
class PerfTimer: | ||
"""A Basic Performance Timer Class.""" | ||
|
||
_start_time: float | None = None | ||
_stop_time: float | None = None | ||
_lap_time: float | None = None | ||
|
||
@property | ||
def start_time(self) -> float | None: | ||
return self._start_time | ||
|
||
@property | ||
def stop_time(self) -> float | None: | ||
return self._stop_time | ||
|
||
@property | ||
def lap_time(self) -> float | None: | ||
return self._lap_time | ||
|
||
def start(self) -> None: | ||
"""Start the timer.""" | ||
if self._start_time is not None: | ||
msg = "Timer is running. Use .stop() to stop it" | ||
raise PerfTimerError(msg) | ||
|
||
self._start_time = time.perf_counter() | ||
|
||
def on_the_clock(self) -> float: | ||
"""Give the time on the clock.""" | ||
if self._start_time is None: | ||
msg = "Timer is not running. Use .start() to start it" | ||
raise PerfTimerError(msg) | ||
|
||
return ( | ||
time.perf_counter() - self._start_time | ||
if self._start_time is not None | ||
else 0.0 | ||
) | ||
|
||
def stop(self) -> None: | ||
"""Stop the timer, Stores the elapsed time, and reset.""" | ||
if self._start_time is None: | ||
msg = "Timer is not running. Use .start() to start it" | ||
raise PerfTimerError(msg) | ||
|
||
self._stop_time = time.perf_counter() | ||
self._lap_time = self._stop_time - self._start_time | ||
self._start_time = None | ||
self._stop_time = None | ||
|
||
|
||
class BatchPerfTimer(PerfTimer): | ||
"""The Performance Timer for Target bulk inserts.""" | ||
|
||
def __init__( | ||
self, | ||
max_size: int, | ||
max_perf_counter: float, | ||
) -> None: | ||
self.SINK_MAX_SIZE_CEILING: int = max_size | ||
self._max_perf_counter: float = max_perf_counter | ||
|
||
SINK_MAX_SIZE_CEILING: int | ||
"""The max size a bulk insert can be""" | ||
|
||
_sink_max_size: int = 100 | ||
"""Hold the calculated batch size""" | ||
|
||
@property | ||
def sink_max_size(self) -> int: | ||
"""The current MAX_SIZE_DEFAULT.""" | ||
return self._sink_max_size | ||
|
||
@property | ||
def max_perf_counter(self) -> float: | ||
"""How many seconds can pass before a insert.""" | ||
return self._max_perf_counter | ||
|
||
@property | ||
def perf_diff_allowed_min(self) -> float: | ||
"""The minimum negative variance allowed, 1/3 worse than wanted.""" | ||
return -1.0 * (self.max_perf_counter * 0.33) | ||
|
||
@property | ||
def perf_diff_allowed_max(self) -> float: | ||
"""The maximum positive variance allowed, 1/4 better than wanted.""" | ||
return self.max_perf_counter * 0.25 | ||
|
||
@property | ||
def perf_diff(self) -> float: | ||
"""Difference between wanted elapsed time and actual elapsed time.""" | ||
diff = self.max_perf_counter - self.lap_time if self.lap_time else 0 | ||
return float(diff) | ||
|
||
def counter_based_max_size(self) -> None: # noqa: C901 | ||
"""Calculate performance based batch size.""" | ||
correction = 0 | ||
if self.perf_diff < self.perf_diff_allowed_min: | ||
if self.sink_max_size >= 15000: # noqa: PLR2004 | ||
correction = -5000 | ||
elif self.sink_max_size >= 10000: # noqa: PLR2004 | ||
correction = -1000 | ||
elif self.sink_max_size >= 1000: # noqa: PLR2004 | ||
correction = -100 | ||
elif self.sink_max_size > 10: # noqa: PLR2004 | ||
correction = -10 | ||
if ( | ||
self.perf_diff >= self.perf_diff_allowed_max | ||
and self.sink_max_size < self.SINK_MAX_SIZE_CEILING | ||
): | ||
if self.sink_max_size >= 10000: # noqa: PLR2004 | ||
correction = 10000 | ||
elif self.sink_max_size >= 1000: # noqa: PLR2004 | ||
correction = 1000 | ||
elif self.sink_max_size >= 100: # noqa: PLR2004 | ||
correction = 100 | ||
elif self.sink_max_size >= 10: # noqa: PLR2004 | ||
correction = 10 | ||
self._sink_max_size += correction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -152,6 +152,30 @@ | |
default=True, | ||
), | ||
).to_dict() | ||
BATCH_SIZE_ROWS_CONFIG = PropertiesList( | ||
Property( | ||
"batch_size_rows", | ||
IntegerType, | ||
description="Maximum number of rows in each batch.", | ||
), | ||
).to_dict() | ||
BATCH_WAIT_LIMIT_SECONDS_CONFIG = PropertiesList( | ||
Property( | ||
"batch_wait_limit_seconds", | ||
IntegerType, | ||
description="Maximum time to elapse for a batch to fill, drain, and load.", | ||
), | ||
).to_dict() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you the other setting here? |
||
BATCH_DYNAMIC_MANAGEMENT_CONFIG = PropertiesList( | ||
Property( | ||
"batch_dynamic_management", | ||
BooleanType, | ||
description=( | ||
"Manages sink_max_size per stream to be" | ||
"the largest size for the batch wait limit." | ||
), | ||
), | ||
).to_dict() | ||
|
||
|
||
class TargetLoadMethods(str, Enum): | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still finding this a bit confusing. I think we want the max batch size to have a default value, and the max wait time to default to
None
so that in the default case, only the current batch size is checked.Essentially:
Does it make sense? I'm sorry, I feel like I'm missing something 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The diagram makes sense. I will need to work through it again tomorrow. I think you feeling like you are missing something is a result of my poor writing. Below is the best flowchart for
batch_dynamic_management
I could make.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be when
batch_dynamic_management
is set toTrue
in the target config andbatch_size_rows
andbatch_wait_limit_seconds
are not preset in the target config?or
Are you meaning default as in none of the three target config settings
batch_size_rows
,batch_wait_limit_seconds
, andbatch_dynamic_management
are present?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@edgarrmondragon When you have a free moment would you please provide me clarification on what you see the "default case" to be. 🙏😃