From bf4a48ccb356cf5ed205a30201e751218da7cfb0 Mon Sep 17 00:00:00 2001 From: Haobo Xu Date: Fri, 20 Dec 2013 18:14:17 -0800 Subject: [PATCH] [RocksDB] [Performance Branch] Revert previous patch. Summary: The previous patch is wrong. rep_.resize(kHeader) just resets the header portion to zero, and should not cause a re-allocation if g++ does it right. I will go ahead and revert it. Test Plan: make check Reviewers: dhruba, sdong CC: leveldb Differential Revision: https://reviews.facebook.net/D14793 --- db/write_batch.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/db/write_batch.cc b/db/write_batch.cc index fa01e82db..c04930bbf 100644 --- a/db/write_batch.cc +++ b/db/write_batch.cc @@ -58,6 +58,7 @@ bool WriteBatch::Handler::Continue() { void WriteBatch::Clear() { rep_.clear(); + rep_.resize(kHeader); } int WriteBatch::Count() const {