Repository navigation
Add time-based batch in network output buffer - #1826
Merged
Merged
Conversation
…onfig class (#1794) This PR is a follow up of #1791 . In #1791 a new `OpExecConfig` class is introduced. This PR updates the simple operators that are mostly one-to-one to use the new class. Most changes are one-line changes that directly map from the old API to the new API. Changes to more complicated operators (join, aggregate, etc..) will be completed in subsequent PRs.
yangzhang75
pushed a commit
to yangzhang75/texera
that referenced
this pull request
Jun 22, 2026
This PR adds a time-based buffer mechanism in addition to tuple count based buffering in our existing implementation. In the existing implementation, each operator only sends it output tuples to downstream operators when a fixed number (400) tuples are accumulated. For slow operators such as sentiment analysis, it takes a long time for the user to see the results. This PR adds a time-based buffer that emits output on a certain time interval (500ms), so that the user can see the final results a lot sooner. **Old:**  **New:** 
This was referenced Oct 19, 2026
renovate-bot
pushed a commit
to renovate-bot/apache-_-texera
that referenced
this pull request
Oct 24, 2026
### What changes were proposed in this PR? Removes the adaptive-batching pause/resume pair from `WorkerTimerService`, which can no longer do anything. **+7/−106 lines.** There is no behaviour change. - **`WorkerTimerService.scala`:** `pauseAdaptiveBatching()`, `resumeAdaptiveBatching()`, and the `isPaused` flag (with its reset in `stopAdaptiveBatching`). `isPaused` could only be set by `pauseAdaptiveBatching()`, which has no production caller, so `resumeAdaptiveBatching()` has never re-armed the timer since then. - **`ResumeHandler.scala`:** the no-op `resumeAdaptiveBatching()` call. The rest of the handler is unchanged. Pause and resume leave the flush timer alone, both before and after this PR. - **Specs:** `WorkerTimerServiceSpec` loses the four cases that only exercised the removed methods. Its start/stop cases drop their `isPaused` asserts, and one stop case that called pause now stops twice instead, keeping its repeated-cancel assertion. `DPThreadSpec` drops eight `resumeAdaptiveBatching` mock expectations. `PauseManager.isPaused`, a different and live member, is untouched. ### History | | | | --- | --- | | **Introduced by** | apache#1826 (2023-02-02), "Add time-based batch in network output buffer": the pause method. apache#2208 (2023-11-16), "Refactoring of amber engine", moved it into `WorkerTimerService` and added `isPaused`, `resumeAdaptiveBatching()` and the `ResumeHandler` call | | **Usage removed by** | apache#2392 (2024-02-19), "Remove breakpoint feature". It deleted the last `pauseAdaptiveBatching()` caller, the breakpoint branch in `DataProcessor` | It has done nothing for over two and a half years. ### Any related issues, documentation, discussions? Closes apache#9026 ### How was this PR tested? No new tests. The surviving start/stop behaviour keeps its cases. Locally, from the repo root with Java 17: - `sbt "WorkflowExecutionService/Test/compile" "WorkflowExecutionService/scalafmtCheckAll" "WorkflowExecutionService/scalafixAll --check"`: success. - `sbt "WorkflowExecutionService/testOnly *WorkerTimerServiceSpec *DPThreadSpec *DataProcessorSpec *WorkerSpec *LoggingSpec *CoordinatorTimerServiceSpec"`: 6 suites, 53 tests, all pass. - `sbt "WorkflowExecutionService/testOnly *e2e.PauseSpec"`, which runs a real pause/resume through `ResumeHandler`: 2 tests, both pass. To re-check: ``` git grep -n -e pauseAdaptiveBatching -e resumeAdaptiveBatching # no hits ``` ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5.5) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR adds a time-based buffer mechanism in addition to tuple count based buffering in our existing implementation.
In the existing implementation, each operator only sends it output tuples to downstream operators when a fixed number (400) tuples are accumulated. For slow operators such as sentiment analysis, it takes a long time for the user to see the results.
This PR adds a time-based buffer that emits output on a certain time interval (500ms), so that the user can see the final results a lot sooner.
Old:

New:
