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; - } - - write_batch_group->push_back(w->batch); + 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; } + + 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