Skip to content

Conversation

@sixpluszero
Copy link
Contributor

@sixpluszero sixpluszero commented Jan 14, 2026

[producer] Make sure online producer respects incoming request order

Previously producer performs async operation that submit operation to a thread pool for e2e produce, but this will result in out-of-order produce which is not our users want.
This PR changes the implementation so that only pre-processing is run in parallel in a thread pool, but the actual produce operations are executed in the same sequence they were initiated

Solution

Code changes

  • Added new code behind a config. If so list the config names and their default values in the PR description.
  • Introduced new log lines.
    • Confirmed if logs need to be rate limited to avoid excessive logging.

Concurrency-Specific Checks

Both reviewer and PR author to verify

  • Code has no race conditions or thread safety issues.
  • Proper synchronization mechanisms (e.g., synchronized, RWLock) are used where needed.
  • No blocking calls inside critical sections that could lead to deadlocks or performance degradation.
  • Verified thread-safe collections are used (e.g., ConcurrentHashMap, CopyOnWriteArrayList).
  • Validated proper exception handling in multi-threaded code to avoid silent thread termination.

How was this PR tested?

  • New unit tests added.
  • New integration tests added.
  • Modified or extended existing tests.
  • Verified backward compatibility (if applicable).

Does this PR introduce any user-facing or breaking changes?

  • No. You can skip the rest of this section.
  • Yes. Clearly explain the behavior change and its impact.

@sixpluszero sixpluszero marked this pull request as draft January 14, 2026 19:22
@sixpluszero sixpluszero marked this pull request as ready for review January 16, 2026 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant