Skip to content

Commit

Permalink
[RocksDB] [Performance Branch] Revert previous patch.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
haoboxu committed Dec 21, 2013
1 parent e94eea4 commit bf4a48c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions db/write_batch.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ bool WriteBatch::Handler::Continue() {

void WriteBatch::Clear() {
rep_.clear();
rep_.resize(kHeader);
}

int WriteBatch::Count() const {
Expand Down

0 comments on commit bf4a48c

Please sign in to comment.