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

[Issue 9496] fix logic in ManagedLedgerWriter when config threadNum >= ledgerNum #9497

Merged
merged 1 commit into from
Feb 8, 2021

Conversation

lifepuzzlefun
Copy link
Contributor

@lifepuzzlefun lifepuzzlefun commented Feb 5, 2021

fix #9496

fix logic in ManagedLedgerWriter when config threadNum >= ledgerNum

Modifications

if threadNum >= ledgerNum.

allocate ledger repeat among threads.

origin logic may have thread without ledger and got an exception.

Verifying this change

build and run
./pulsar-perf managed-ledger -e 3 -w 2 -o 10000 --threads 20 -r 100000 -s 2048 -zk localhost:2181

no exception in stdlog

Documentation

  • Does this pull request introduce a new feature? no
  • If yes, how is the feature documented? (not applicable)

fix logic in ManagedLedgerWriter when config threadNum >= ledgerNum
@sijie sijie added the area/tool label Feb 7, 2021
@sijie sijie added this to the 2.8.0 milestone Feb 7, 2021
@sijie sijie merged commit 07f3509 into apache:master Feb 8, 2021
@codelipenghui codelipenghui added the cherry-picked/branch-2.7 Archived: 2.7 is end of life label Feb 18, 2021
codelipenghui pushed a commit that referenced this pull request Feb 18, 2021
…= ledgerNum (#9497)

Fix #9496 

fix logic in ManagedLedgerWriter when config threadNum >= ledgerNum

### Modifications

if threadNum >= ledgerNum.

allocate ledger repeat among threads.

origin logic may have thread without ledger and got an exception.

### Verifying this change

build and run 
`./pulsar-perf managed-ledger -e 3 -w 2 -o 10000 --threads 20 -r 100000 -s 2048 -zk localhost:2181`

no exception in stdlog

### Documentation

  - Does this pull request introduce a new feature?   no
  - If yes, how is the feature documented? (not applicable)

(cherry picked from commit 07f3509)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[test-tool] pulsar-perf managed-ledger test tool fail when ledgerNum < threadNum
4 participants