This is an automated email from the ASF dual-hosted git repository.

git-site-role pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new 68d376b  Updated site at revision c4af734
68d376b is described below

commit 68d376b7960ab0927a3f7484d010a4d5db0f7a95
Author: jenkins <bui...@apache.org>
AuthorDate: Thu May 3 04:20:41 2018 +0000

    Updated site at revision c4af734
---
 content/bps/BP-32-advisory-write-close/index.html | 346 ++++++++++++++++++++++
 content/community/bookkeeper_proposals/index.html |   6 +-
 2 files changed, 351 insertions(+), 1 deletion(-)

diff --git a/content/bps/BP-32-advisory-write-close/index.html 
b/content/bps/BP-32-advisory-write-close/index.html
new file mode 100644
index 0000000..d89e21c
--- /dev/null
+++ b/content/bps/BP-32-advisory-write-close/index.html
@@ -0,0 +1,346 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Apache BookKeeper&trade; - BP-32: Advisory (optimistic) write 
close</title>
+
+<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1">
+
+<link rel="stylesheet" href="/css/normalize.css">
+<link rel="stylesheet" href="/css/tippy.css">
+<link rel="stylesheet" href="/css/style.css">
+
+<link rel="shortcut icon" href="/img/favicon.ico">
+
+<script src="/js/tippy.min.js"></script>
+
+<script type="text/javascript">
+  var shiftWindow = function() { scrollBy(0, -25); };
+  window.addEventListener("hashchange", shiftWindow);
+  window.addEventListener("pageshow", shiftWindow);
+  function load() { if (window.location.hash) shiftWindow(); }
+</script>
+  </head>
+  <body class="body">
+    <main class="main">
+      
+<nav class="navbar bk-topnav">
+  <div class="navbar-brand">
+    <a class="navbar-item bk-brand" href="/">
+      Apache BookKeeper&trade;
+    </a>
+
+    <div class="navbar-burger burger" data-target="bkNav">
+      <span></span>
+      <span></span>
+      <span></span>
+    </div>
+  </div>
+
+  <div id="bkNav" class="navbar-menu">
+    <div class="navbar-start">
+      <div class="navbar-item has-dropdown is-hoverable">
+        <a class="navbar-link">Documentation</a>
+        <div class="navbar-dropdown is-boxed">
+          <a class="navbar-item" href="/docs/latest/overview/overview">
+            Version 4.8.0-SNAPSHOT
+            <span class="tag is-warning">Development</span>
+          </a>
+          <a class="navbar-item" href="/docs/latest/api/javadoc">
+            <span class="icon bk-javadoc-icon">
+              <img src="/img/java-icon.svg">
+            </span>
+            Javadoc
+          </a>
+          <hr class="dropdown-divider">
+          
+          <a class="navbar-item" href="/docs/4.7.0/overview/overview">
+            Release 4.7.0
+            
+          </a>
+          
+          <a class="navbar-item" href="/docs/4.6.2/overview/overview">
+            Release 4.6.2
+            <span class="tag is-success">Stable</span>
+          </a>
+          
+          <a class="navbar-item" href="/docs/4.6.1/overview/overview">
+            Release 4.6.1
+            
+          </a>
+          
+          <a class="navbar-item" href="/docs/4.6.0/overview/overview">
+            Release 4.6.0
+            
+          </a>
+          
+          <a class="navbar-item" href="/docs/4.5.1/overview/overview">
+            Release 4.5.1
+            
+          </a>
+          
+          <a class="navbar-item" href="/docs/4.5.0/overview/overview">
+            Release 4.5.0
+            
+          </a>
+          
+          
+          <a class="navbar-item" href="/archives/docs/r4.4.0">
+            Release 4.4.0
+            
+          </a>
+          
+          <a class="navbar-item" href="/archives/docs/r4.3.2">
+            Release 4.3.2
+            
+          </a>
+          
+          <a class="navbar-item" href="/archives/docs/r4.3.1">
+            Release 4.3.1
+            
+          </a>
+          
+          <a class="navbar-item" href="/archives/docs/r4.3.0">
+            Release 4.3.0
+            
+          </a>
+          
+          <a class="navbar-item" href="/archives/docs/r4.2.4">
+            Release 4.2.4
+            
+          </a>
+          
+          <a class="navbar-item" href="/archives/docs/r4.2.3">
+            Release 4.2.3
+            
+          </a>
+          
+          <a class="navbar-item" href="/archives/docs/r4.2.2">
+            Release 4.2.2
+            
+          </a>
+          
+          <a class="navbar-item" href="/archives/docs/r4.2.1">
+            Release 4.2.1
+            
+          </a>
+          
+          <a class="navbar-item" href="/archives/docs/r4.2.0">
+            Release 4.2.0
+            
+          </a>
+          
+          <a class="navbar-item" href="/archives/docs/r4.1.0">
+            Release 4.1.0
+            
+          </a>
+          
+          <a class="navbar-item" href="/archives/docs/r4.0.0">
+            Release 4.0.0
+            
+          </a>
+          
+        </div>
+      </div>
+
+      <div class="navbar-item has-dropdown is-hoverable">
+        <a class="navbar-link">Community</a>
+        <div class="navbar-dropdown is-boxed">
+          <a class="navbar-item" href="/community/mailing-lists">Mailing 
lists</a>
+          <a class="navbar-item" href="/community/slack">Slack</a>
+          <a class="navbar-item" 
href="https://github.com/apache/bookkeeper/issues";>Github Issues</a>
+          <a class="navbar-item" href="/community/releases">Release 
Management</a>
+          <a class="navbar-item" href="/community/meeting">Community 
Meetings</a>
+          <hr class="dropdown-divider">
+          <a class="navbar-item" href="/community/contributing">Contribution 
Guide</a>
+          <a class="navbar-item" href="/community/coding_guide">Coding 
Guide</a>
+          <a class="navbar-item" href="/community/testing">Testing Guide</a>
+          <a class="navbar-item" href="/community/issue-report">Issue Report 
Guide</a>
+          <a class="navbar-item" href="/community/release_guide">Release 
Guide</a>
+          <hr class="dropdown-divider">
+          <a class="navbar-item" 
href="/community/presentations">Presentations</a>
+          <a class="navbar-item" 
href="/community/bookkeeper_proposals">BookKeeper Proposals</a>
+        </div>
+      </div>
+
+      <div class="navbar-item has-dropdown is-hoverable">
+        <a class="navbar-link">Project</a>
+        <div class="navbar-dropdown is-boxed">
+          <a class="navbar-item" href="/project/who">Who are we?</a>
+          <a class="navbar-item" href="/project/bylaws">Bylaws</a>
+          <a class="navbar-item" 
href="http://www.apache.org/licenses/";>License</a>
+          <hr class="dropdown-divider">
+          <a class="navbar-item" href="/project/privacy">Privacy policy</a>
+          <a class="navbar-item" 
href="http://www.apache.org/foundation/sponsorship.html";>Sponsorship</a>
+          <a class="navbar-item" 
href="http://www.apache.org/foundation/thanks.html";>Thanks</a>
+        </div>
+      </div>
+    </div>
+
+    <div class="navbar-end">
+      <div class="navbar-item">
+        <div class="field is-grouped">
+          <p class="control">
+            <a class="button bk-twitter" 
href="https://twitter.com/asfbookkeeper";>
+              <span class="icon">
+                <i class="fa fa-twitter"></i>
+              </span>
+              <span>Twitter</span>
+            </a>
+          </p>
+          <p class="control">
+            <a class="button" href="https://github.com/apache/bookkeeper";>
+              <span class="icon">
+                <i class="fa fa-github"></i>
+              </span>
+              <span>GitHub</span>
+            </a>
+          </p>
+          <p class="control">
+            <a class="button is-primary" href="/releases">
+              <span class="icon">
+                <i class="fa fa-download"></i>
+              </span>
+              <span>Download</span>
+            </a>
+          </p>
+        </div>
+      </div>
+    </div>
+  </div>
+</nav>
+
+
+      <div class="bk-community-container">
+  <div class="columns">
+    <div class="column is-12">
+      <header class="docs-title">
+        <nav class="level">
+          <div class="level-left">
+            <div class="level-item">
+              <h1 class="title">BP-32: Advisory (optimistic) write close</h1>
+            </div>
+          </div>
+          
+        </nav>
+
+        
+      </header>
+
+      <hr />
+
+      <div class="content is-medium">
+        <section class="bk-community-content">
+          <h3 id="motivation">Motivation</h3>
+
+<p>With entrylog per ledger feature 
(https://github.com/apache/bookkeeper/issues/570) there will be dedicated 
entrylog for each ledger and it provides EntryLogManagerForEntryLogPerLedger 
(EntryLogManager). Since there is going to be entrylog per ledger, with the 
current Bookie implementation there is no way for 
EntryLogManagerForEntryLogPerLedger (EntryLogManager) to know when the entrylog 
is writeclosed, so that entrylog for the active ledger can be rotated. So it 
would be ideal to have [...]
+
+<h3 id="proposed-changes">Proposed Changes</h3>
+
+<p>So in entrylog per ledger feature implementation, as a first step of 
handling this, expireAfterAccess (each entrylog should be automatically rotated 
from the current active entrylog list once a fixed duration has elapsed after 
the last access of entrylog for addEntry) will be implemented and also the 
maximum number of entrylogs that can be active at a given time (this is for 
limiting number of entrylogs/filedescriptors open at a given time).</p>
+
+<p>The above mentioned approaches are preliminary ways of handling but it 
would be ideal to have explicit call to EntryLogger when the write for this 
ledger is done so that it can rotate the entrylog as soon as it is write 
closed. So to implement this following can be done</p>
+
+<ul>
+  <li>
+    <p>have explicit write close request. This write close request should be 
sent to the current ensemble when the write handle is closed. This should be 
just optimistic write close operation and callback of this operation should be 
just logger, saying if it is succeeded / partially succeeded / failed. This 
should be done asynchronously and the write handle close operation should not 
be blocked for this response.</p>
+  </li>
+  <li>
+    <p>In the case of ledger recover open, readrequest (ReadEntryProcessorV3) 
with fence flag, can take care of calling appropriate methods in 
ledgerdescriptor / entry logger to rotate the entrylog for the ledger</p>
+  </li>
+  <li>
+    <p>in the case of auto-replication case, LedgerFragmentReplicator already 
uses bookieclient for addEntry (bkc.getBookieClient().addEntry), the same 
bookieClient instance can be used to call explicit writeClose method in 
bookieclient.</p>
+  </li>
+  <li>
+    <p>in the case of any write failure in bookie for an entry, then before 
sending error response to the client do entrylog rotation</p>
+  </li>
+</ul>
+
+<p>EntryLogManagerForEntryLogPerLedger is the class which is last layer in the 
stack to receive this writeClose call for a ledger, it would store this info in 
in-memory data structure and when next next checkpoint is called it would 
rotate entrylogs of these writeclosed ledgers.</p>
+
+<h3 id="public-interfaces">Public Interfaces</h3>
+
+<p>As explained above, this advisory write close should be transparent to 
Bookkeeper API user, this should be piggybagged in writehandle close call and 
other internal Bookie / BookieClient internal class methods 
(ReadEntryProcessorV3.readrequest and LedgerFragmentReplicator). But this 
feature introduces new protobuf message between Client and Bookie.</p>
+
+<p>message WriteCloseRequest {
+    required int64 ledgerId = 1;
+    required bytes masterKey = 2;  <br />
+}</p>
+
+<p>message WriteCloseResponse {
+    required StatusCode status = 1;
+    required int64 ledgerId = 2;<br />
+}</p>
+
+<h3 id="compatibility-deprecation-and-migration-plan">Compatibility, 
Deprecation, and Migration Plan</h3>
+
+<ul>
+  <li>With this feature we are introducing new protocol message. Will do the 
required Compatibility testing. But since it is going to be advisory 
(optimistic) in nature, failure in this request in anyway should not affect 
functioning in any way.</li>
+  <li>Also, possibly this explicit write close can be used in future for other 
purposes.</li>
+</ul>
+
+<h3 id="test-plan">Test Plan</h3>
+
+<ul>
+  <li>unit tests for all the write/read handle close scenarios, recoveropen 
and replicator scenarios</li>
+  <li>end-to-end integrations tests.</li>
+</ul>
+
+<h3 id="rejected-alternatives">Rejected Alternatives</h3>
+
+<p>N/A</p>
+
+        </section>
+
+        
+      </div>
+    </div>
+  </div>
+</div>
+    </main>
+
+    <footer class="footer">
+  <div class="container">
+    <div class="content has-text-centered">
+      <p>
+        Copyright &copy; 2016 - 2018 <a href="https://www.apache.org/";>The 
Apache Software Foundation</a>,<br /> licensed under the <a 
href="http://www.apache.org/licenses/LICENSE-2.0";>Apache License, version 
2.0</a>.
+      </p>
+    </div>
+  </div>
+</footer>
+
+  </body>
+
+  <script src="/js/app.js"></script>
+
+  
+  <!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+      http://www.apache.org/licenses/LICENSE-2.0
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+<script>
+  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new 
Date();a=s.createElement(o),
+  
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+  
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
+
+  ga('create', 'UA-104419626-1', 'auto');
+  ga('send', 'pageview');
+
+</script>
+
+  
+</html>
diff --git a/content/community/bookkeeper_proposals/index.html 
b/content/community/bookkeeper_proposals/index.html
index b6d62bd..093920a 100644
--- a/content/community/bookkeeper_proposals/index.html
+++ b/content/community/bookkeeper_proposals/index.html
@@ -356,7 +356,7 @@ of the thread is of the format <code 
class="highlighter-rouge">[DISCUSS] BP-&lt;
 
 <p>This section lists all the <em>bookkeeper proposals</em> made to 
BookKeeper.</p>
 
-<p><em>Next Proposal Number: 32</em></p>
+<p><em>Next Proposal Number: 33</em></p>
 
 <h3 id="inprogress">Inprogress</h3>
 
@@ -416,6 +416,10 @@ of the thread is of the format <code 
class="highlighter-rouge">[DISCUSS] BP-&lt;
       <td style="text-align: left"><a href="../../bps/BP-31-durability">BP-31: 
BookKeeper Durability Anchor</a></td>
       <td style="text-align: left">Accepted</td>
     </tr>
+    <tr>
+      <td style="text-align: left"><a 
href="../../bps/BP-32-advisory-write-close">BP-32: Advisory (optimistic) write 
close</a></td>
+      <td style="text-align: left">Draft</td>
+    </tr>
   </tbody>
 </table>
 

-- 
To stop receiving notification emails like this one, please contact
git-site-r...@apache.org.

Reply via email to