Skip to content

Removed contention between producers on ManagedLedger addEntry#1521

Merged
sijie merged 1 commit into
apache:masterfrom
merlimat:managed-ledger-add-entry
Apr 9, 2018
Merged

Removed contention between producers on ManagedLedger addEntry#1521
sijie merged 1 commit into
apache:masterfrom
merlimat:managed-ledger-add-entry

Conversation

@merlimat

@merlimat merlimat commented Apr 7, 2018

Copy link
Copy Markdown
Contributor

Motivation

When there are multiple producers writing on the same topic and there are many entries/second (little batching), there can be thread contention when doing managedLedger.addEntry().

Modifications

  • Do the sync part of add entry from a thread hashed on the name of the managed ledger.

Result

This will remove the contention on both the ManagedLedger and the BK LedgerHandler mutexes.

@merlimat merlimat added the type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages label Apr 7, 2018
@merlimat merlimat added this to the 2.0.0-incubating milestone Apr 7, 2018
@merlimat merlimat self-assigned this Apr 7, 2018
@merlimat
merlimat requested review from jai1, rdhabalia and sijie April 7, 2018 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants