congbobo184 commented on issue #14436:
URL: https://github.com/apache/pulsar/issues/14436#issuecomment-1064758710


   We have roughly analyzed the problem. First of all, we declare that he is 
not a problem that can block the 2.10 and 2.92 releases. Let's analyze the 
reasons for this problem:
   
   The reason for this is the reuse of the 
`org.apache.bookkeeper.client.impl.LedgerEntryImpl` object.
   
   I log in three position:
   1. `org.apache.bookkeeper.client.impl.LedgerEntryImpl` create
   2. `org.apache.bookkeeper.client.impl.LedgerEntryImpl` recycle
   3. handle read response in bk client
   
![image](https://user-images.githubusercontent.com/39078850/157799630-1036fb94-ca63-4627-8059-82b4ceaf128a.png)
   
![image](https://user-images.githubusercontent.com/39078850/157799674-9ae680e4-d54b-490e-84c1-9854089bb0fb.png)
   
   
![image](https://user-images.githubusercontent.com/39078850/157799568-19ed08f4-aba2-42dd-924c-94c18532ff46.png)
   
   
![image](https://user-images.githubusercontent.com/39078850/157800470-e81db958-7540-4f76-9ae2-41f29a9bd37e.png)
   1. As we can see this log, `LedgerEntryImpl` for entry(899:173) create and 
then recycle, it don't log `firstcomplete`, this certify this  
`LedgerEntryImpl`(1167574521) don't receive any data from bookie server, maybe 
receive an error then it recycle.
   2. When `LedgerEntryImpl` for entry(899:173) recycle, it reuse for read 
entry (1395:220) then it create and then receive the response from the bookie 
client
   3. But when it haven't recycle, the reponse for read entry(899:173) arrive, 
then use the `LedgerEntryImpl`(1167574521) now read for entry (1395:220) to 
handle this response. but now `LedgerEntryImpl`(1167574521)  is not use by read 
entry(899:173). So the data is not (1395:220), it is  entry(899:173)'s data 
then return broker. The entryId is  (1395:220) but data is entry(899:173). So 
will produce this problem.
   4. Then recycle the `org.apache.bookkeeper.client.impl.LedgerEntryImpl`
   
   As we can see, this problem is from bookie client and is a long-standing 
problem.  So we don't block 2.10 and 2.9.2 release, should wait bookie fix and 
release, so we release broker first and then fix this issue in bookie client.
   
   Waiting for the fix to complete I will show it in this issue.


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to