Skip to content

Conversation

@lordcheng10
Copy link
Contributor

@lordcheng10 lordcheng10 commented Nov 2, 2022

Motivation

In the trimDeletedEntries method, the removed entry is not released:

public void trimDeletedEntries(List<Entry> entries) {
entries.removeIf(entry -> ((PositionImpl) entry.getPosition()).compareTo(markDeletePosition) <= 0
|| individualDeletedMessages.contains(entry.getLedgerId(), entry.getEntryId()));
}

protected synchronized boolean trySendMessagesToConsumers(ReadType readType, List<Entry> entries) {
if (needTrimAckedMessages()) {
cursor.trimDeletedEntries(entries);
}

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository: lordcheng10#38

@lordcheng10
Copy link
Contributor Author

@codelipenghui @Jason918 PTAL,thanks!

Copy link
Contributor

@codelipenghui codelipenghui left a comment

Choose a reason for hiding this comment

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

Nice catch!

@lordcheng10
Copy link
Contributor Author

/pulsarbot run-failure-checks

@codecov-commenter
Copy link

codecov-commenter commented Nov 3, 2022

Codecov Report

Merging #18305 (56d0e6e) into master (0866c3a) will increase coverage by 12.57%.
The diff coverage is 46.41%.

Impacted file tree graph

@@              Coverage Diff              @@
##             master   #18305       +/-   ##
=============================================
+ Coverage     38.97%   51.54%   +12.57%     
+ Complexity     8311     7356      -955     
=============================================
  Files           683      400      -283     
  Lines         67325    43678    -23647     
  Branches       7217     4479     -2738     
=============================================
- Hits          26239    22516     -3723     
+ Misses        38079    18735    -19344     
+ Partials       3007     2427      -580     
Flag Coverage Δ
unittests 51.54% <46.41%> (+12.57%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
.../main/java/org/apache/pulsar/PulsarStandalone.java 0.00% <ø> (ø)
...che/pulsar/broker/BookKeeperClientFactoryImpl.java 0.00% <0.00%> (ø)
.../org/apache/pulsar/broker/admin/AdminResource.java 65.42% <0.00%> (-1.09%) ⬇️
...pulsar/broker/admin/impl/PersistentTopicsBase.java 58.95% <0.00%> (+6.65%) ⬆️
...pache/pulsar/broker/admin/v2/PersistentTopics.java 71.68% <0.00%> (+0.88%) ⬆️
...pulsar/broker/service/PulsarCommandSenderImpl.java 73.29% <ø> (-1.07%) ⬇️
...ersistentStreamingDispatcherMultipleConsumers.java 0.00% <0.00%> (ø)
...ransaction/buffer/impl/InMemTransactionBuffer.java 0.00% <ø> (ø)
...nsaction/buffer/impl/TransactionBufferDisable.java 52.63% <ø> (ø)
.../metadata/v2/TransactionBufferSnapshotIndexes.java 0.00% <0.00%> (ø)
... and 360 more

@lordcheng10
Copy link
Contributor Author

/pulsarbot run-failure-checks

@lordcheng10
Copy link
Contributor Author

@AnonHxy @Jason918 @HQebupt PTAL,thanks!

@lordcheng10
Copy link
Contributor Author

@Technoboy- PTAL,thanks!

@lordcheng10
Copy link
Contributor Author

/pulsarbot run-failure-checks

2 similar comments
@lordcheng10
Copy link
Contributor Author

/pulsarbot run-failure-checks

@lordcheng10
Copy link
Contributor Author

/pulsarbot run-failure-checks

@coderzc
Copy link
Member

coderzc commented Nov 3, 2022

/pulsarbot run-failure-checks

Pulsar CI Flaky is not necessary.

@codelipenghui codelipenghui merged commit 79a3f85 into apache:master Nov 3, 2022
congbobo184 pushed a commit that referenced this pull request Nov 8, 2022
@congbobo184 congbobo184 added the cherry-picked/branch-2.9 Archived: 2.9 is end of life label Nov 8, 2022
congbobo184 pushed a commit that referenced this pull request Nov 26, 2022
aloyszhang pushed a commit to aloyszhang/pulsar that referenced this pull request Nov 30, 2022
…ntry (apache#18305) (merge request !161)

Squash merge branch 'release-2.8.1.4-fix_mem_leak' into 'release-2.8.1.4'
Fixes #<xyz>

### Motivation
[fix][broker] In the trimDeletedEntries method, release the removed entry (apache#18305)
liangyepianzhou pushed a commit that referenced this pull request Dec 14, 2022
aloyszhang pushed a commit to aloyszhang/pulsar that referenced this pull request Jan 9, 2023
…ntry (apache#18305) (merge request !161)

Squash merge branch 'release-2.8.1.4-fix_mem_leak' into 'release-2.8.1.4'
Fixes #<xyz>

### Motivation
[fix][broker] In the trimDeletedEntries method, release the removed entry (apache#18305)
nicoloboschi pushed a commit to datastax/pulsar that referenced this pull request Jan 10, 2023
…ntry (apache#18305)

(cherry picked from commit 79a3f85)
(cherry picked from commit 4eb93ec)
nicoloboschi pushed a commit to datastax/pulsar that referenced this pull request Jan 11, 2023
…ntry (apache#18305)

(cherry picked from commit 79a3f85)
(cherry picked from commit 4eb93ec)
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.

7 participants