You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by iv...@apache.org on 2018/01/26 17:20:14 UTC
[bookkeeper] branch master updated: [MERGE YAHOO REPO] Flush after
writing out index
This is an automated email from the ASF dual-hosted git repository.
ivank pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git
The following commit(s) were added to refs/heads/master by this push:
new b38cd67 [MERGE YAHOO REPO] Flush after writing out index
b38cd67 is described below
commit b38cd67a042aae0cac32aef69e814d7ade31bf03
Author: Jia Zhai <zh...@apache.org>
AuthorDate: Fri Jan 26 18:20:00 2018 +0100
[MERGE YAHOO REPO] Flush after writing out index
Descriptions of the changes in this PR:
This is cherry-pick from yahoo repo of branch yahoo-4.3.
original commit is:
https://github.com/yahoo/bookkeeper/commit/fecdb751
YBK-14: Flush after writing out index
Author: Jia Zhai <zh...@apache.org>
Author: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Reviewers: Ivan Kelly <iv...@apache.org>, Enrico Olivelli <eo...@gmail.com>, Sijie Guo <si...@apache.org>, Matteo Merli <mm...@apache.org>
This closes #1060 from jiazhai/cherry_picks/i_177
---
.../src/main/java/org/apache/bookkeeper/bookie/EntryLogger.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/EntryLogger.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/EntryLogger.java
index eaf3663..112a602 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/EntryLogger.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/EntryLogger.java
@@ -568,6 +568,9 @@ public class EntryLogger {
} finally {
serializedMap.release();
}
+ // Flush the ledger's map out before we write the header.
+ // Otherwise the header might point to something that is not fully written
+ entryLogChannel.flush(false);
// Update the headers with the map offset and count of ledgers
ByteBuffer mapInfo = ByteBuffer.allocate(8 + 4);
--
To stop receiving notification emails like this one, please contact
ivank@apache.org.