[
https://issues.apache.org/jira/browse/BOOKKEEPER-101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13150621#comment-13150621
]
[email protected] commented on BOOKKEEPER-101:
----------------------------------------------------------
bq. On 2011-11-15 07:18:20, Dhruba Borthakur wrote:
bq. >
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java, line
583
bq. > <https://reviews.apache.org/r/2594/diff/4/?file=57330#file57330line583>
bq. >
bq. > Just a minor nit: maybe rename addEntryToLedger to
addEntryInternal() just to distinguish public methods from private methods. No
big deal anyways!
Changed.
bq. On 2011-11-15 07:18:20, Dhruba Borthakur wrote:
bq. >
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java, line
602
bq. > <https://reviews.apache.org/r/2594/diff/4/?file=57330#file57330line602>
bq. >
bq. > This is called when a client is trying to do recovery. In this case,
should this call first assert that the fenced flag is already set in the
handle? something like:
bq. >
bq. > if (!handle.isFeenced()) {
bq. > throw Exception()
bq. > }
we don't always fence the ledger before recovery. In the case of bookie
recovery, we want to replicate all active ledgers to ensure full replication.
Some may be open, some may be. In this case we use a recovery add, to ensure we
can add. All adds will be of entries read from the same ledger, on another
bookie.
bq. On 2011-11-15 07:18:20, Dhruba Borthakur wrote:
bq. >
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java, line
639
bq. > <https://reviews.apache.org/r/2594/diff/4/?file=57330#file57330line639>
bq. >
bq. > I like this simple api to fence. Maybe the javadoc can specify that
even if the handle is already fenced, invoking this api is ok and keeps the
fencing flag still set.
Added.
bq. On 2011-11-15 07:18:20, Dhruba Borthakur wrote:
bq. >
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java, line
642
bq. > <https://reviews.apache.org/r/2594/diff/4/?file=57330#file57330line642>
bq. >
bq. > A handle, once fenced, can never be set to an 'unfenced' state, am I
correct?
Yes, fencing is permanent.
- Ivan
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/2594/#review3245
-----------------------------------------------------------
On 2011-11-10 11:14:47, Ivan Kelly wrote:
bq.
bq. -----------------------------------------------------------
bq. This is an automatically generated e-mail. To reply, visit:
bq. https://reviews.apache.org/r/2594/
bq. -----------------------------------------------------------
bq.
bq. (Updated 2011-11-10 11:14:47)
bq.
bq.
bq. Review request for bookkeeper.
bq.
bq.
bq. Summary
bq. -------
bq.
bq. BookKeeper is designed for use as a Write ahead log. In systems with a
primary/backup architecture, the primary will write state updates to the WAL.
If the primary dies the backup comes online, reads the WAL to get the latest
state and starts serving requests. However, if the primary was only partitioned
from the network, or stuck in a long GC, a split brain occurs. Both primary and
backup can service client requests.
bq.
bq. Fencing(http://en.wikipedia.org/wiki/Fencing_%28computing%29) ensures that
this cannot happen. With fencing, the backup can close the WAL of the primary,
and cause any subsequent attempt by the primary to write to the WAL to give an
error.
bq.
bq.
bq. This addresses bug BOOKKEEPER-101.
bq. https://issues.apache.org/jira/browse/BOOKKEEPER-101
bq.
bq.
bq. Diffs
bq. -----
bq.
bq. bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Bookie.java
d651894
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/BookieException.java
292617e
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/LedgerDescriptor.java
024cac3
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BKException.java
d7c8f67
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeper.java
a1fbab7
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeperAdmin.java
b3eb5b9
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerCreateOp.java
6f72e47
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java
8c2a54f
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerMetadata.java
328c7ca
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerOpenOp.java
a68856c
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerRecoveryOp.java
7465c52
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/PendingAddOp.java
eddd760
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/PendingReadOp.java
385b16c
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/ReadLastConfirmedOp.java
c2d4cee
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/ReadOnlyLedgerHandle.java
PRE-CREATION
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieClient.java
d70ae27
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieProtocol.java
873dafe
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieServer.java
f1b3ad9
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/NIOServerFactory.java
e0743bb
bq.
bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/PerChannelBookieClient.java
2cd4de8
bq.
bookkeeper-server/src/test/java/org/apache/bookkeeper/client/TestFencing.java
PRE-CREATION
bq.
bookkeeper-server/src/test/java/org/apache/bookkeeper/proto/TestProtoVersions.java
f6cd8c9
bq.
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BaseTestCase.java
6bac569
bq.
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieClientTest.java
97dc2ab
bq.
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieRecoveryTest.java
ac54d9a
bq.
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/LoopbackClient.java
85822bf
bq.
hedwig-server/src/main/java/org/apache/hedwig/server/benchmark/BookieBenchmark.java
18319d7
bq.
bq. Diff: https://reviews.apache.org/r/2594/diff
bq.
bq.
bq. Testing
bq. -------
bq.
bq.
bq. Thanks,
bq.
bq. Ivan
bq.
bq.
> Add Fencing to Bookkeeper
> -------------------------
>
> Key: BOOKKEEPER-101
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-101
> Project: Bookkeeper
> Issue Type: New Feature
> Reporter: Ivan Kelly
> Assignee: Ivan Kelly
> Fix For: 4.0.0
>
> Attachments: BOOKKEEPER-101.diff, BOOKKEEPER-101.diff,
> BOOKKEEPER-101.diff, BOOKKEEPER-101.diff
>
>
> BookKeeper is designed for use as a Write ahead log. In systems with a
> primary/backup architecture, the primary will write state updates to the WAL.
> If the primary dies the backup comes online, reads the WAL to get the latest
> state and starts serving requests. However, if the primary was only
> partitioned from the network, or stuck in a long GC, a split brain occurs.
> Both primary and backup can service client requests.
> Fencing(http://en.wikipedia.org/wiki/Fencing_%28computing%29) ensures that
> this cannot happen. With fencing, the backup can close the WAL of the
> primary, and cause any subsequent attempt by the primary to write to the WAL
> to give an error.
> We fence a ledger whenever it is opened by another client using
> BookKeeper#openLedger. BookKeeper#openLedgerNoRecovery will not fence.
> The opening client marks the ledger as fenced in zookeeper, and then sends a
> readEntry message to a all of bookies with the DO_FENCING flag set. Once at
> least 1 bookie in each possible quorum of bookies have responded, we can
> proceed with opening the ledger. Any subsequent attempt to write to the
> ledger will fail as it will not be able to write to a quorum without one of
> the bookie in the quorum responding with a ledger fenced error. The client
> will also be unable to change the quorum without seeing that the ledger has
> been marked as fenced in zookeeper.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira