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 253a268  Updated site at revision bf7e15e
253a268 is described below

commit 253a268e005b31b9a3af5c92c432b06165109664
Author: jenkins <[email protected]>
AuthorDate: Fri Aug 17 16:37:21 2018 +0000

    Updated site at revision bf7e15e
---
 .../bps/BP-34-cluster-metadata-checker/index.html  | 368 +++++++++++++++++++++
 content/community/bookkeeper_proposals/index.html  |   6 +-
 2 files changed, 373 insertions(+), 1 deletion(-)

diff --git a/content/bps/BP-34-cluster-metadata-checker/index.html 
b/content/bps/BP-34-cluster-metadata-checker/index.html
new file mode 100644
index 0000000..cd0a1a5
--- /dev/null
+++ b/content/bps/BP-34-cluster-metadata-checker/index.html
@@ -0,0 +1,368 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Apache BookKeeper&trade; - </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.1/overview/overview">
+            Release 4.7.1
+            
+          </a>
+          
+          <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"></h1>
+            </div>
+          </div>
+          
+        </nav>
+
+        
+      </header>
+
+      <hr />
+
+      <div class="content is-medium">
+        <section class="bk-community-content">
+          <h3 id="motivation">Motivation</h3>
+
+<p>Currently in the Auditor we have two checkers - Periodic Bookie Check and 
Periodic Ledger check. Bookie Check validates the availability of bookies and 
if it finds any lost bookies it will mark ledgers residing in the lost bookies 
to be under replicated. Ledger Check reads the first entry and last entry of 
the segment from all the corresponding bookies of the ensemble and if it fails 
to read any entry then it will mark that ledger under replicated.  By setting 
appropriate value to the [...]
+
+<p>Ideally for having complete confidence on the date in the cluster, it is 
needed to have a new checker - validating ledger placement policy, durability 
contract, progress in handling under replication and availability of bookies of 
the ensemble of ledgers. Though by configuring 
‘auditorLedgerVerificationPercentage’ to 100% in periodic ledger check, we 
would get most of what we are intending to achieve. But this comes at heavy 
price since it involves reading all the entries from all the [...]
+
+<h3 id="proposed-changes">Proposed Changes</h3>
+
+<p>Intention of this new checker is to validate following things
+       - ledger placement policy : Ensemble of each segment in Ledger should 
adhere to LedgerPlacementPolicy
+       - durability contract : Every entry has WQ number of replicas and 
entries are replicated according to RoundRobinDistributionSchedule
+       - progress in handling under replication : No ledger is marked 
underreplicated for more than acceptable time
+       - availability of bookies of the ensemble of ledgers : If Auditor fails 
to get response from a Bookie, then that Bookie shouldn’t be registered to 
metadata server and Auditor should be aware of it unavailability or if it is a 
transient error in getting response from Bookie then subsequent calls to that 
Bookie should succeed.</p>
+
+<p>Roles and Responsibilities of the cluster metadata checker</p>
+<ul>
+  <li>Police the durability contract and report violations. Its job is to make 
sure that the metadata server(zk) and the storage servers (bookies) are in 
sync. Simply put, check if bookies agree with the metadata server metadata and 
if not, raise an alert.</li>
+  <li>Scrutiny’s job is not to fix if it finds any inconsistency. Instead make 
a noise about it. If the scrutiny fails, it means that we have a potential 
hole(bug) in our service to meet the durability contract. Scrutiny exposes that 
hole with enough information the help identify the issue and fix it.</li>
+  <li>The Metadata Scrutiny needs to be light weighted esp., on Bookie and 
must run regularly giving the confidence that the cluster is in good state.</li>
+</ul>
+
+<p>High Level Logic
+       - Things would get complicated analyzing ledgers which are not closed 
because of several reasons, viz., unable to know lastEntryId by reading ZK 
metadata, possibility of change in ensemble because of write failure to a 
bookie, and other subtleties in dealing with last unclosed segment of the 
ledger. So for the sake of simplicity this checker should be limited to ledgers 
which are write closed/fenced.
+       - This durability check for each ledger will be run as a processor in 
ledgerManager.asyncProcessLedgers and it would ignore ledgers which are still 
open for write.
+       - first step is to check if this ledger is marked underreplicated 
already. If it is marked underreplicated for more than acceptable time then 
report it as violation otherwise skip this underreplicated ledger for this 
iteration of durability check. Since there is no point in further analyzing 
this ledger if it is already marked under replicated.
+       - get the ledger metadata of the ledger from the metadata server
+       - make sure that the ensemble of the ledger segments is in agreement 
with ledgerplacement policy. Any violation should be reported.
+       - get the info about available entries of the ledger from the bookies 
of the ensemble. Bookie is expected to return list of entries it contains for a 
given ledger
+       - Have to make sure that Bookies contain all the entries it is supposed 
to contain according to the RoundRobinDistributionSchedule and each entry has 
writequorum number of copies. Any violation should be reported.
+       - If there is any failure in trying to get info. from Bookie of the 
ensembles of the ledger, then add this ledger to potentially faulty ledgers 
list (but don’t report it yet.)
+       - (in previous steps, in case of any violation or bookie read error, 
before reporting violation, check if the ledger is marked underreplicated. If 
it is marked underreplicated then ignore this ledger for this iteration. If it 
is not marked underreplicated, then get the ledgermetadata of this ledger 
onemore time. Check if it is any different from the ledgermetadata we got 
initially then instead of reporting the violation, redo the analysis for this 
ledger because apparently something had [...]
+       - if there are potentially faulty ledgers because of 
unavailable/unreachable bookies, then schedule a new durability check task with 
time delay just for the potentially faulty ledgers. Even after subsequent 
delayed checks, if Auditor failed to get response from bookies then make sure 
that Bookie isn’t registered to metadata server and Auditor is aware of it 
unavailability, if not then report the violation.
+       - Auditor is going to use existing mechanisms/frameworks to report the 
violations - bookkeeper-stats statslogger/counters and complementing 
information in logs.
+       - It makes sense to group all the durability violations found in a 
scrutiny run according to the categories and report the aggregated count for 
each category after the end of the scrutiny run.
+       - before reporting these violations, each violation should be logged 
with complete information, so that it can be used to understand what went 
wrong.</p>
+
+<h3 id="public-interfaces">Public Interfaces</h3>
+
+<p>To know the entries of a ledger data persisted in a Bookie, currently there 
is no other way than reading the entry from bookie using BookieClient instance. 
So for auditor to know what entries of a ledger, Bookie contains we need to 
have a new on wire Bookkeeper protocol API as mentioned below.</p>
+
+<div class="highlighter-rouge"><div class="highlight"><pre 
class="highlight"><code>message GetListOfEntriesOfALedgerRequest {
+       required int64 ledgerId = 1;
+}
+
+message GetListOfEntriesOfALedgerResponse {
+       required StatusCode status = 1;
+       required int64 ledgerId = 2;
+       optional bytes availabilityOfEntriesOfLedger = 3; // treated as array 
of bits indicating availability of entry at that particular index location      
          
+}
+</code></pre></div></div>
+
+<p>For the sake of future extensibility it would be helpful to add version 
info (and possibly some metadata in the future) at the beginning of the 
‘availabilityOfEntriesOfLedger’. So the first 64 bytes will be considered 
reserved space, with the first byte specifying the version for now and the rest 
of the bytes in the reserved space will be 0’s.</p>
+
+<p>Here Bookie is expected to attain this information just from just 
LedgerCache (Index Files) - IndexPersistenceMgr and IndexInMemPageMgr but it 
doesn’t actually check the availability of this entry in Entrylogger. Since the 
intention of this checker is limited to do just metadata validation at cluster 
level.</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.</li>
+</ul>
+
+<h3 id="test-plan">Test Plan</h3>
+
+<ul>
+  <li>unit tests for newly introduced API/code at LedgerCache Level</li>
+  <li>end-to-end tests for the new Protocol request/response</li>
+  <li>validating the checker in all cases of violations</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>
+      <p>
+        Apache BookKeeper, BookKeeper®, Apache®, the Apache feature logo, and 
the Apache BookKeeper logo are either registered trademarks or trademarks of 
The Apache Software Foundation.
+      </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 edbba8b..42475c8 100644
--- a/content/community/bookkeeper_proposals/index.html
+++ b/content/community/bookkeeper_proposals/index.html
@@ -361,7 +361,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: 34</em></p>
+<p><em>Next Proposal Number: 35</em></p>
 
 <h3 id="inprogress">Inprogress</h3>
 
@@ -429,6 +429,10 @@ of the thread is of the format <code 
class="highlighter-rouge">[DISCUSS] BP-&lt;
       <td style="text-align: left"><a 
href="../../bps/BP-33-building-official-docker-imags">BP-33: Move releasing 
docker images out of main repo</a></td>
       <td style="text-align: left">Draft</td>
     </tr>
+    <tr>
+      <td style="text-align: left"><a 
href="../../bps/BP-34-cluster-metadata-checker">BP-34: Cluster Metadata 
Checker</a></td>
+      <td style="text-align: left">Accepted</td>
+    </tr>
   </tbody>
 </table>
 

Reply via email to