refactor: prepare for snapshotting

This commit is contained in:
Chris Lu
2019-04-16 09:55:37 -07:00
parent af49aea0c6
commit 338e6d60a5
5 changed files with 9 additions and 8 deletions

View File

@@ -170,6 +170,7 @@ func (fs *FilerServer) doAutoChunk(ctx context.Context, w http.ResponseWriter, r
Chunks: fileChunks,
}
if db_err := fs.filer.CreateEntry(ctx, entry); db_err != nil {
fs.filer.DeleteChunks(entry.FullPath, entry.Chunks)
replyerr = db_err
filerResult.Error = db_err.Error()
glog.V(0).Infof("failing to write %s to filer server : %v", path, db_err)