You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/12/10 07:28:27 UTC

[GitHub] [pulsar] Renkai opened a new pull request #8890: Add entry cached ledger handle

Renkai opened a new pull request #8890:
URL: https://github.com/apache/pulsar/pull/8890


   This PR is used to tunning cached ledger handle


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] Renkai commented on pull request #8890: Add entry cached ledger handle

Posted by GitBox <gi...@apache.org>.
Renkai commented on pull request #8890:
URL: https://github.com/apache/pulsar/pull/8890#issuecomment-742487727


   /pulsarbot run-failure-checks


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] Renkai commented on pull request #8890: Add entry cached ledger handle

Posted by GitBox <gi...@apache.org>.
Renkai commented on pull request #8890:
URL: https://github.com/apache/pulsar/pull/8890#issuecomment-742886245


   > @Renkai Can you describe more in the detail the purpose of this change?
   
   Hi, it's still a draft, I will fill more details before mark it as ready for review.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] merlimat commented on pull request #8890: Add entry cached ledger handle

Posted by GitBox <gi...@apache.org>.
merlimat commented on pull request #8890:
URL: https://github.com/apache/pulsar/pull/8890#issuecomment-742669028


   @Renkai Can you describe more in the detail the purpose of this change?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] Renkai closed pull request #8890: [WIP]Add entry cached ledger handle

Posted by GitBox <gi...@apache.org>.
Renkai closed pull request #8890:
URL: https://github.com/apache/pulsar/pull/8890


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] eolivelli commented on a change in pull request #8890: Add entry cached ledger handle

Posted by GitBox <gi...@apache.org>.
eolivelli commented on a change in pull request #8890:
URL: https://github.com/apache/pulsar/pull/8890#discussion_r540031097



##########
File path: managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/EntryCache.java
##########
@@ -115,6 +117,15 @@ void asyncReadEntry(ReadHandle lh, long firstEntry, long lastEntry, boolean isSl
      */
     void asyncReadEntry(ReadHandle lh, PositionImpl position, ReadEntryCallback callback, Object ctx);
 
+    /**
+     * Read a sequence of entries from the cache or from bookkeeper.
+     *
+     * @param firstEntry id of first entry of sequence
+     * @param lastEntry  id of last entry of sequence, inclusive
+     * @return an handle to the result of the operation
+     */
+    CompletableFuture<LedgerEntries> asyncReadEntry(ReadHandle lh, long firstEntry, long lastEntry);

Review comment:
       please remember that LedgerEntries is to be "closed" after use, otherwise you will have a memory leak.
   
   we should document this fact in the javadoc and also implement a proper lifecycle for what we are putting into the cache




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org