zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hanm <...@git.apache.org>
Subject [GitHub] zookeeper pull request #560: ZOOKEEPER-3082: Fix server snapshot behavior wh...
Date Fri, 27 Jul 2018 03:35:54 GMT
Github user hanm commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/560#discussion_r205659448
  
    --- Diff: src/java/main/org/apache/zookeeper/server/persistence/FileTxnSnapLog.java ---
    @@ -399,8 +399,30 @@ public void save(DataTree dataTree,
             File snapshotFile = new File(snapDir, Util.makeSnapshotName(lastZxid));
             LOG.info("Snapshotting: 0x{} to {}", Long.toHexString(lastZxid),
                     snapshotFile);
    -        snapLog.serialize(dataTree, sessionsWithTimeouts, snapshotFile, syncSnap);
    -
    +        try {
    +            snapLog.serialize(dataTree, sessionsWithTimeouts, snapshotFile, syncSnap);
    +        } catch (IOException e) {
    +            if (snapshotFile.length() == 0) {
    --- End diff --
    
    >> If that sounds reasonable, I'd propose that we commit on this patch and close
the hole created from this particular issue
    
    SGTM. @breed - ok with you? If so I'll commit this.


---

Mime
View raw message