GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix the PendingAddOp is not recycled when LedgerHandler closed by zymap · Pull Request #3321 · apache/bookkeeper

Conversation

@zymap

@zymap zymap commented Jun 7, 2022

Copy link
Copy Markdown
Member

Motivation

When adding an entry into a bookie, the entry data lifecycle
is handled by the bookie client. The data buffer will be
released after receiving a corresponding response from the
bookie server. So the user doesn't care about the entry
buffer releasing.
But when the ledgerHandler is closed, the PendingAddOp is not
recycled which leads to the data buffer never being released.
We should release that after the callback is executed.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

hangc0276 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@zymap
Fix the PendingAddOp is not recycled when LedgerHandler closed
dca270a
---

**Motivation**

When adding an entry into a bookie, the entry data lifecycle
is handled by the bookie client. The data buffer will be
released after receiving a corresponding response from the
bookie server. So the user doesn't care about the entry
buffer releasing.
But when the ledgerHandler is closed, the PendingAddOp is not
recycled which leads to the data buffer never being released.
We should release that after the callback executed.
@zymap zymap added type/bug area/client release/4.14.6 release/4.15.1 labels Jun 7, 2022
@zymap zymap added this to the 4.16.0 milestone Jun 7, 2022
@zymap
zymap requested review from dlg99, eolivelli and merlimat June 7, 2022 09:13
@zymap zymap self-assigned this Jun 7, 2022
eolivelli
eolivelli approved these changes Jun 7, 2022
View reviewed changes

@eolivelli eolivelli left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

The change makes sense to me.
I am not sure we buy much advantage by recycling the Op object in this corner case.

I am afraid of possible side-effects that we would find only in the future.

btw +1 from me, good catch !

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
merlimat
merlimat approved these changes Jun 8, 2022
View reviewed changes
lordcheng10
lordcheng10 approved these changes Jun 8, 2022
View reviewed changes

@lordcheng10 lordcheng10 left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

nice catch.
I have encountered the problem of too many PendingAddOp objects causing GC in pulsar, this may solve my problem.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@eolivelli
eolivelli merged commit 3d01e6e into apache:master Jun 8, 2022
eolivelli pushed a commit that referenced this pull request Jun 8, 2022
@zymap @eolivelli
Fix the PendingAddOp is not recycled when LedgerHandler closed (#3321)
9180005
---

**Motivation**

When adding an entry into a bookie, the entry data lifecycle
is handled by the bookie client. The data buffer will be
released after receiving a corresponding response from the
bookie server. So the user doesn't care about the entry
buffer releasing.
But when the ledgerHandler is closed, the PendingAddOp is not
recycled which leads to the data buffer never being released.
We should release that after the callback executed.

(cherry picked from commit 3d01e6e)
@eolivelli

eolivelli commented Jun 8, 2022

Copy link
Copy Markdown
Contributor

I have cherry-picked this change to branch-4.15 and branch-4.14

zymap and lordcheng10 reacted with heart emoji
All reactions
  • ❤️ 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

eolivelli pushed a commit that referenced this pull request Jun 8, 2022
@zymap @eolivelli
Fix the PendingAddOp is not recycled when LedgerHandler closed (#3321)
f2f1ab5
---

**Motivation**

When adding an entry into a bookie, the entry data lifecycle
is handled by the bookie client. The data buffer will be
released after receiving a corresponding response from the
bookie server. So the user doesn't care about the entry
buffer releasing.
But when the ledgerHandler is closed, the PendingAddOp is not
recycled which leads to the data buffer never being released.
We should release that after the callback executed.

(cherry picked from commit 3d01e6e)
eolivelli pushed a commit to datastax-archive/datastax--bookkeeper that referenced this pull request Jun 8, 2022
@zymap @eolivelli
Fix the PendingAddOp is not recycled when LedgerHandler closed (apach…
4f9d5d9
…e#3321)

---

**Motivation**

When adding an entry into a bookie, the entry data lifecycle
is handled by the bookie client. The data buffer will be
released after receiving a corresponding response from the
bookie server. So the user doesn't care about the entry
buffer releasing.
But when the ledgerHandler is closed, the PendingAddOp is not
recycled which leads to the data buffer never being released.
We should release that after the callback executed.

(cherry picked from commit 3d01e6e)
@hangc0276 hangc0276 mentioned this pull request Jun 24, 2022
Add memory limiter for the add entry request to avoid OOM #3139
Open
@zymap zymap added cherry-picked/branch-4.14 cherry-picked/branch-4.15 labels Aug 1, 2022
@lhotari lhotari mentioned this pull request Aug 9, 2022
[Broker & Bookie] Configure Bookkeeper client & server backpressure by default apache/pulsar#10439
Open
Shawyeok pushed a commit to Shawyeok/bookkeeper that referenced this pull request Oct 21, 2022
@zymap @Shawyeok
Fix the PendingAddOp is not recycled when LedgerHandler closed (apach…
02a6e28
…e#3321)

---

**Motivation**

When adding an entry into a bookie, the entry data lifecycle
is handled by the bookie client. The data buffer will be
released after receiving a corresponding response from the
bookie server. So the user doesn't care about the entry
buffer releasing.
But when the ledgerHandler is closed, the PendingAddOp is not
recycled which leads to the data buffer never being released.
We should release that after the callback executed.

(cherry picked from commit 3d01e6e)
@zhaohaidao zhaohaidao mentioned this pull request Oct 28, 2022
[Bug] NPE throwed when recovering ledger: Cannot read field "distributionSchedule" because "this.lh" is null apache/pulsar#18163
Closed
2 tasks done
@zhaohaidao zhaohaidao mentioned this pull request Nov 7, 2022
Apply recycle logic during add entry creation but ledger close to LedgerHandleAdv #3621
Merged
hangc0276 pushed a commit that referenced this pull request Nov 14, 2022
@zhaohaidao
Apply recycle logic during add entry creation but ledger close to Led…
0d2fbe4
…gerHandleAdv (#3621)

Descriptions of the changes in this PR:
Apply recycle logic during add entry creation but ledger close to LedgerHandleAdv

### Motivation
This pr is a supplement to #3321
If I understand correctly. these recycled logic should be applied to LedgerHandleAdv
hangc0276 pushed a commit that referenced this pull request Nov 14, 2022
@zhaohaidao @hangc0276
Apply recycle logic during add entry creation but ledger close to Led…
b4d0be2
…gerHandleAdv (#3621)

Descriptions of the changes in this PR:
Apply recycle logic during add entry creation but ledger close to LedgerHandleAdv

### Motivation
This pr is a supplement to #3321
If I understand correctly. these recycled logic should be applied to LedgerHandleAdv

(cherry picked from commit 0d2fbe4)
nicoloboschi pushed a commit to datastax-archive/datastax--bookkeeper that referenced this pull request Jan 11, 2023
@zhaohaidao @nicoloboschi
Apply recycle logic during add entry creation but ledger close to Led…
c746316
…gerHandleAdv (apache#3621)

Descriptions of the changes in this PR:
Apply recycle logic during add entry creation but ledger close to LedgerHandleAdv

### Motivation
This pr is a supplement to apache#3321
If I understand correctly. these recycled logic should be applied to LedgerHandleAdv

(cherry picked from commit 0d2fbe4)
(cherry picked from commit b4d0be2)
yaalsn pushed a commit to yaalsn/bookkeeper that referenced this pull request Jan 30, 2023
@zhaohaidao @yaalsn
Apply recycle logic during add entry creation but ledger close to Led…
0de2a67
…gerHandleAdv (apache#3621)

Descriptions of the changes in this PR:
Apply recycle logic during add entry creation but ledger close to LedgerHandleAdv

### Motivation
This pr is a supplement to apache#3321
If I understand correctly. these recycled logic should be applied to LedgerHandleAdv
zymap pushed a commit that referenced this pull request Feb 16, 2023
@zhaohaidao @zymap
Apply recycle logic during add entry creation but ledger close to Led…
a7436e6
…gerHandleAdv (#3621)

Descriptions of the changes in this PR:
Apply recycle logic during add entry creation but ledger close to LedgerHandleAdv

### Motivation
This pr is a supplement to #3321
If I understand correctly. these recycled logic should be applied to LedgerHandleAdv

(cherry picked from commit 0d2fbe4)
Ghatage pushed a commit to sijie/bookkeeper that referenced this pull request Jul 12, 2024
@zymap Anup Ghatage
Fix the PendingAddOp is not recycled when LedgerHandler closed (apach…
89704f9
…e#3321)

---

**Motivation**

When adding an entry into a bookie, the entry data lifecycle
is handled by the bookie client. The data buffer will be
released after receiving a corresponding response from the
bookie server. So the user doesn't care about the entry
buffer releasing.
But when the ledgerHandler is closed, the PendingAddOp is not
recycled which leads to the data buffer never being released.
We should release that after the callback executed.
Ghatage pushed a commit to sijie/bookkeeper that referenced this pull request Jul 12, 2024
@zhaohaidao Anup Ghatage
Apply recycle logic during add entry creation but ledger close to Led…
2bc0809
…gerHandleAdv (apache#3621)

Descriptions of the changes in this PR:
Apply recycle logic during add entry creation but ledger close to LedgerHandleAdv

### Motivation
This pr is a supplement to apache#3321
If I understand correctly. these recycled logic should be applied to LedgerHandleAdv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@merlimat merlimat merlimat approved these changes
@eolivelli eolivelli eolivelli approved these changes
@dlg99 dlg99 Awaiting requested review from dlg99
+1 more reviewer
@lordcheng10 lordcheng10 lordcheng10 approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@zymap zymap

Labels

area/client cherry-picked/branch-4.14 cherry-picked/branch-4.15 release/4.14.6 release/4.15.1 type/bug

Projects

None yet

Milestone

4.16.0

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@zymap @eolivelli @merlimat @lordcheng10
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.