summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Canadi <icanadi@fb.com>2014-10-08 10:04:12 -0700
committerIgor Canadi <icanadi@fb.com>2014-10-08 10:21:10 -0700
commit1fdd726a8254c13d0c66d8db8130ad17c13d7bcc (patch)
tree1e080a9833a42d3923458630ab32732548c890c5
parentd67500a591589e3205e69029dd141efb4a0451c6 (diff)
Hotfix RocksDB 3.5rocksdb-3.5.1
Summary: We'll release this as 3.5.1 Test Plan: Tested in master Reviewers: tnovak, yhchiang, sdong, ljin Reviewed By: ljin Subscribers: leveldb Differential Revision: https://reviews.facebook.net/D24639
-rw-r--r--Makefile2
-rw-r--r--db/db_impl.cc18
-rw-r--r--include/rocksdb/version.h2
3 files changed, 13 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index b9cf4da4f..0e969e0fd 100644
--- a/Makefile
+++ b/Makefile
@@ -177,7 +177,7 @@ SHARED = $(SHARED1)
else
# Update db.h if you change these.
SHARED_MAJOR = 3
-SHARED_MINOR = 4
+SHARED_MINOR = 5
SHARED1 = ${LIBNAME}.$(PLATFORM_SHARED_EXT)
SHARED2 = $(SHARED1).$(SHARED_MAJOR)
SHARED3 = $(SHARED1).$(SHARED_MAJOR).$(SHARED_MINOR)
diff --git a/db/db_impl.cc b/db/db_impl.cc
index 7c65e9a61..54faef263 100644
--- a/db/db_impl.cc
+++ b/db/db_impl.cc
@@ -4163,15 +4163,19 @@ void DBImpl::BuildBatchGroup(Writer** last_writer,
break;
}
- if (w->batch != nullptr) {
- size += WriteBatchInternal::ByteSize(w->batch);
- if (size > max_size) {
- // Do not make batch too big
- break;
- }
+ if (w->batch == nullptr) {
+ // Do not include those writes with nullptr batch. Those are not writes,
+ // those are something else. They want to be alone
+ break;
+ }
- write_batch_group->push_back(w->batch);
+ size += WriteBatchInternal::ByteSize(w->batch);
+ if (size > max_size) {
+ // Do not make batch too big
+ break;
}
+
+ write_batch_group->push_back(w->batch);
w->in_batch_group = true;
*last_writer = w;
}
diff --git a/include/rocksdb/version.h b/include/rocksdb/version.h
index d6ccaeda5..410986843 100644
--- a/include/rocksdb/version.h
+++ b/include/rocksdb/version.h
@@ -7,7 +7,7 @@
// Also update Makefile if you change these
#define ROCKSDB_MAJOR 3
#define ROCKSDB_MINOR 5
-#define ROCKSDB_PATCH 0
+#define ROCKSDB_PATCH 1
// Do not use these. We made the mistake of declaring macros starting with
// double underscore. Now we have to live with our choice. We'll deprecate these