Skip to content
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

feature: Add min batch size support #562

Conversation

Ehud-Lev-Forter
Copy link
Contributor

@Ehud-Lev-Forter Ehud-Lev-Forter commented Mar 3, 2023

Add min batch size support
We would like to support minimum batch size. Since we might have a time with no traffic and we don't want to wait forever for the events that are not satisfy minimum batch, we will also add minBatchTimeoutInMillis, if we passed this timeout, code will be as today.
see issue

Checklist

  • Documentation (if applicable)
  • Changelog

astubbs and others added 30 commits July 12, 2021 15:52
Due to lack of updating last check time when no offsets were able to be committed.
squash: turn down size of high volume test and remove Isolated from mult instance reblaance
squash-fix: Add missing resource lock to static state accessing test
Dont share collections in test and synchronise collection access.
…ulation

Elapsed duration was truncating ms, cause frequency check to always return ok - causing the spin lock on commits
Running tests in parallel on jenkins puts a lot more load on it - ease up on requirements.

Longer delay for chance to rebalance.

Assert no concurrent exception instead of catching.
Experiencing some failures in Jenkins environment.
Add support for managed executor service
`find ./ -type f -print0 | xargs -0 dos2unix --`
Fixes confluentinc#60 - upgrade AK to 2.7.0.

Adds 2.7.0 as a stable build.
This messes with the shutdown process of the Producer, i.e. committing final transactions, offsets etc.
@rkolesnev rkolesnev self-requested a review March 13, 2023 09:30
nachomdo and others added 6 commits April 3, 2023 18:01
…itions are revoked (confluentinc#548)

* Fix deadlock on partitions revoked

* Add unit test for rebalance deadlock on EoS

* Update changelog and readme

* merge with master changes

* Fix misplaced comment
…nc#556)

Bumps `mockito.version` from 4.9.0 to 5.1.1.

Updates `mockito-core` from 4.9.0 to 5.1.1
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](mockito/mockito@v4.9.0...v5.1.1)

Updates `mockito-junit-jupiter` from 4.9.0 to 5.1.1
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](mockito/mockito@v4.9.0...v5.1.1)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:development
  update-type: version-update:semver-major
- dependency-name: org.mockito:mockito-junit-jupiter
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: John Byrne <[email protected]>
Bumps `vertx.version` from 4.3.6 to 4.4.1.

Updates `vertx-web-client` from 4.3.6 to 4.4.1

Updates `vertx-junit5` from 4.3.6 to 4.4.1

---
updated-dependencies:
- dependency-name: io.vertx:vertx-web-client
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.vertx:vertx-junit5
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…entinc#555)

Bumps [versions-maven-plugin](https://github.com/mojohaus/versions) from 2.14.1 to 2.15.0.
- [Release notes](https://github.com/mojohaus/versions/releases)
- [Changelog](https://github.com/mojohaus/versions/blob/master/ReleaseNotes.md)
- [Commits](mojohaus/versions@2.14.1...2.15.0)

---
updated-dependencies:
- dependency-name: org.codehaus.mojo:versions-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…c#528)

Bumps [threeten-extra](https://github.com/ThreeTen/threeten-extra) from 1.7.1 to 1.7.2.
- [Release notes](https://github.com/ThreeTen/threeten-extra/releases)
- [Commits](ThreeTen/threeten-extra@v1.7.1...v1.7.2)

---
updated-dependencies:
- dependency-name: org.threeten:threeten-extra
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…nfluentinc#544)

* Avoid expensive calculation of properties for debug / trace logging when debug / trace logging is not enabled.

---------

Co-authored-by: Lenne Hendrickx <[email protected]>
Copy link
Contributor

@rkolesnev rkolesnev left a comment

Choose a reason for hiding this comment

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

In general logical flow looks fine to me.
I would really like to see more tests and integration tests for it though - with transactions, different ordering modes (Unordered / Key /Partition) and 'normal' non-reactor usage mode of PC - it has a potential to introduce edge case issues that additional tests could shake out.

@what-the-diff
Copy link

what-the-diff bot commented May 27, 2023

PR Summary

  • Added minBatchSize and minBatchTimeoutInMillis options
    These options have been added to ParallelConsumerOptions for better control of batch processing.
  • Updated ShardManager and WorkManager methods
    The getWorkIfAvailable() methods in both classes now support the new minBatchSize and minBatchTimeoutInMillis parameters.
  • Updated validation in ParallelConsumerOptions
    The validation of options in the ParallelConsumerOptions class has been updated to include the newly added parameters.
  • New test for min batch size
    A new test has been added to ensure proper functionality of the min batch size feature.
  • Updated copyright year
    The copyright year has been updated to 2023 in all relevant files.

dependabot bot and others added 6 commits June 6, 2023 21:19
…entinc#580)

Bumps [maven-release-plugin](https://github.com/apache/maven-release) from 3.0.0-M7 to 3.0.1.
- [Release notes](https://github.com/apache/maven-release/releases)
- [Commits](apache/maven-release@maven-release-3.0.0-M7...maven-release-3.0.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-release-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@Ehud-Lev-Forter Ehud-Lev-Forter force-pushed the ehud-lev-add-min-batch-size branch from 77de211 to 4b17c0d Compare June 11, 2023 13:28
Ehud-Lev-Forter and others added 6 commits June 13, 2023 20:10
…nkins (confluentinc#583)

* update dependencies

* add maven wrapper

* Update jenkinsfile to use mvnw

* Add to changelog
* add instance id into thread name

* Add instance id to thread name if possible

---------

Co-authored-by: lixy <[email protected]>
Co-authored-by: Edward Vaisman <[email protected]>
Copy link
Member

@eddyv eddyv left a comment

Choose a reason for hiding this comment

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

Seems to break a test

[ERROR] io.confluent.parallelconsumer.state.WorkManagerTest.resumesFromNextShard(ProcessingOrder)[1] -- Time elapsed: 0.007 s <<< FAILURE!
14:36:51  expected: 1
14:36:51  but was : 2

@eddyv eddyv added the wait for info Waiting for additional info from user label Jun 20, 2023
…umer/ParallelConsumerOptions.java

Co-authored-by: Edward Vaisman <[email protected]>
@cla-assistant
Copy link

cla-assistant bot commented Aug 8, 2023

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wait for info Waiting for additional info from user
Projects
None yet
Development

Successfully merging this pull request may close these issues.