You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2019/02/12 08:16:59 UTC

[GitHub] eolivelli commented on a change in pull request #1944: BP-38: Bypass journal ledger

eolivelli commented on a change in pull request #1944: BP-38: Bypass journal ledger
URL: https://github.com/apache/bookkeeper/pull/1944#discussion_r255841970
 
 

 ##########
 File path: site/bps/BP-38-bypass-journal-ledger.md
 ##########
 @@ -0,0 +1,90 @@
+---
+title: "BP-38: bypass journal ledger"
+issue: https://github.com/apache/bookkeeper/issues/1918
+state: "Under Discussion"
+release: "N/A"
+---
+
+### Motivation
+
+To guarantee high durability, BK write journal before flush data to persistent device which will cause two write of data.
+But we may not need this level of persistence under [scenarios](https://cwiki.apache.org/confluence/display/BOOKKEEPER/BP-14+Relax+durability) which prefer weak durability guarantee.
+This proposal is aimed at providing bypass journal ledger, this feature includes these parts work:
+ - add new write flag `BYPASS_JOURNAL` to existing protocol
+ - impl the newly write flag at the client side and server side
+ 
+The details of changes are listed in Section “[Proposed Changes](#proposed-changes)”.
+ 
+### Public Interfaces
+
+This feature will introduce new 'WRITE_FLAG' to enable single write storage impl.
+Like `DEFERRED_SYNC`, when we construct `WriteHandle`, we can pass `BYPASS_JOURNAL`, then every `AddRequest` will carry this flag.
+As for monitoring, we can add metrics to record the main time interval during the io path.
+The detailed compatibility related stuff is in Section “[CDMP](#compatibility-deprecation-and-migration-plan)”.
+
+### Proposed Changes
+
+While the main approach is based on [`WRITE_FLAG` impl](https://github.com/apache/bookkeeper/pull/742),
+the actual implementation is more tricky. In my opinion, there are three different solution:
+
+1. Relax LAC protocol
+
+    Modify server side code mostly and don't change legerHandle's LAC advance logic, if the write flag is `BYPASS_JOURNAL`, after write to `LegerStorage`(the data maybe in the memTable, or the buffer of File, or the os cache),
 
 Review comment:
   > don't change legerHandle's LAC advance logic
   
   I think we should use the DEFERRED_SYNC way of handling LAC, that is that a regular write will not advance LAC, but you need a "force" (like you state below).
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services