Skip to content

Commit 1fdd726

Browse files
committed
Hotfix RocksDB 3.5
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
1 parent d67500a commit 1fdd726

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

Diff for: Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ SHARED = $(SHARED1)
177177
else
178178
# Update db.h if you change these.
179179
SHARED_MAJOR = 3
180-
SHARED_MINOR = 4
180+
SHARED_MINOR = 5
181181
SHARED1 = ${LIBNAME}.$(PLATFORM_SHARED_EXT)
182182
SHARED2 = $(SHARED1).$(SHARED_MAJOR)
183183
SHARED3 = $(SHARED1).$(SHARED_MAJOR).$(SHARED_MINOR)

Diff for: db/db_impl.cc

+11-7
Original file line numberDiff line numberDiff line change
@@ -4163,15 +4163,19 @@ void DBImpl::BuildBatchGroup(Writer** last_writer,
41634163
break;
41644164
}
41654165

4166-
if (w->batch != nullptr) {
4167-
size += WriteBatchInternal::ByteSize(w->batch);
4168-
if (size > max_size) {
4169-
// Do not make batch too big
4170-
break;
4171-
}
4166+
if (w->batch == nullptr) {
4167+
// Do not include those writes with nullptr batch. Those are not writes,
4168+
// those are something else. They want to be alone
4169+
break;
4170+
}
41724171

4173-
write_batch_group->push_back(w->batch);
4172+
size += WriteBatchInternal::ByteSize(w->batch);
4173+
if (size > max_size) {
4174+
// Do not make batch too big
4175+
break;
41744176
}
4177+
4178+
write_batch_group->push_back(w->batch);
41754179
w->in_batch_group = true;
41764180
*last_writer = w;
41774181
}

Diff for: include/rocksdb/version.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// Also update Makefile if you change these
88
#define ROCKSDB_MAJOR 3
99
#define ROCKSDB_MINOR 5
10-
#define ROCKSDB_PATCH 0
10+
#define ROCKSDB_PATCH 1
1111

1212
// Do not use these. We made the mistake of declaring macros starting with
1313
// double underscore. Now we have to live with our choice. We'll deprecate these

0 commit comments

Comments
 (0)