Skip to content

Commit

Permalink
Hotfix RocksDB 3.5
Browse files Browse the repository at this point in the history
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
  • Loading branch information
igorcanadi committed Oct 8, 2014
1 parent d67500a commit 1fdd726
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
18 changes: 11 additions & 7 deletions db/db_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion include/rocksdb/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1fdd726

Please sign in to comment.