Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

Pipeline Improvements #1117

Merged
merged 7 commits into from
Mar 19, 2019
Merged

Pipeline Improvements #1117

merged 7 commits into from
Mar 19, 2019

Conversation

ajsutton
Copy link
Contributor

@ajsutton ajsutton commented Mar 18, 2019

PR description

When creating batches as part of a pipeline, instead of having a dedicated thread that creates the batches, do it inline via a new BatchingReadPipe which wraps a normal ReadPipe.

Also improve the metrics we capture for pipelines so we capture number of tasks added and removed from each pipeline making it possible to calculate how many tasks are in each pipe.

@ajsutton ajsutton changed the title Create batches on the fly Pipeline Improvements Mar 18, 2019

@Test
public void shouldAddAtMostOneItemWhenDraining() {
// Collecting a batch of batches is pretty silly so only ever drain one batch at a time.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the record, nothing actually ever calls this but it seems better to give it a vaguely sane implementation than to throw an exception and not implement the underlying interface properly.

@ajsutton ajsutton merged commit 967f8fc into PegaSysEng:master Mar 19, 2019
@ajsutton ajsutton deleted the batching-pipe branch March 19, 2019 00:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants