Align RDataSource cleanup routine with other sources #17961
Merged
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.
The call to cleanup routines was introduced in commit 0a719b4
The commit description informs it was done to avoid having setup and teardown routines called multiple times for the same column. In single-thread processing, the concept of one task is the processing of the entire computation graph for that run. As such, CleanupTask is called in RunTreeReader and RunEmptySource at the end of the function. In the case of RunDataSource, this routine is called in-between every event range processing. This commit aligns the RunDataSource logic with the logic of the other two single-thread processing methods, i.e. CleanupTask is now called at the end of the run.
Part 6 of N for #17895