[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14504602#comment-14504602
 ] 

Hudson commented on BOOKKEEPER-848:
-----------------------------------

SUCCESS: Integrated in bookkeeper-master #1028 (See 
[https://builds.apache.org/job/bookkeeper-master/1028/])
BOOKKEEPER-848: Use volatile for lastAddConfirmed (Matteo Merli via sijie) 
(sijie: rev 70da24d504e3f4cba0d87a0914a0add7ea19394d)
* bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java
* CHANGES.txt


> Use volatile for lastAddConfirmed
> ---------------------------------
>
>                 Key: BOOKKEEPER-848
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-848
>             Project: Bookkeeper
>          Issue Type: Bug
>    Affects Versions: 4.3.0
>            Reporter: Matteo Merli
>            Assignee: Matteo Merli
>            Priority: Minor
>             Fix For: 4.4.0
>
>         Attachments: 
> 0001-BOOKKEEPER-848-Use-volatile-for-lastAddConfirmed.patch
>
>
> LastAddConfirmed in LedgerHandle is updated when an entry is persisted 
> successfully. 
> When sending a new entry, the most recent lastAddConfirmed is sent along. The 
> reason is to start with a reasonable (confirmed) entryId when doing ledger 
> recovery, by reading all entries from lastAddConfirmed until a 
> NoEntryException is reached. 
> If lastAddConfirmed updates are not visible to the thread that is writing new 
> entries, new entries will carrie an older lastAddConfirmed value, and 
> recovering the ledger will requiring reading one-by-one many entries.
> When writing several thousand of entries per sec, the lastAddConfirmed can 
> lag behind a lot from the real last entry.
> We should use volatile, to ensure writing thread sees the updated version.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to