Skip to content

Commit 0a6ae83

Browse files
authored
Merge branch 'unstable' into feature/tdigest-for-first-pr
2 parents 7f6d090 + fe5d7f3 commit 0a6ae83

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/storage/batch_indexer.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ class WriteBatchIndexer : public rocksdb::WriteBatch::Handler {
3636
explicit WriteBatchIndexer(engine::Storage* storage, rocksdb::WriteBatchWithIndex* dest_batch,
3737
const rocksdb::Snapshot* snapshot)
3838
: storage_(storage), dest_batch_(dest_batch), snapshot_(snapshot) {
39-
DCHECK_NOTNULL(storage);
40-
DCHECK_NOTNULL(dest_batch);
41-
DCHECK_NOTNULL(snapshot);
39+
DCHECK_NE(storage, nullptr);
40+
DCHECK_NE(dest_batch, nullptr);
41+
DCHECK_NE(snapshot, nullptr);
4242
}
4343
explicit WriteBatchIndexer(engine::Context& ctx)
4444
: WriteBatchIndexer(ctx.storage, ctx.batch.get(), ctx.GetSnapshot()) {}

src/storage/storage.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ rocksdb::Status Storage::Get(engine::Context &ctx, const rocksdb::ReadOptions &o
605605
rocksdb::ColumnFamilyHandle *column_family, const rocksdb::Slice &key,
606606
std::string *value) {
607607
if (ctx.txn_context_enabled) {
608-
DCHECK_NOTNULL(options.snapshot);
608+
DCHECK_NE(options.snapshot, nullptr);
609609
DCHECK_EQ(ctx.GetSnapshot()->GetSequenceNumber(), options.snapshot->GetSequenceNumber());
610610
}
611611
rocksdb::Status s;
@@ -630,7 +630,7 @@ rocksdb::Status Storage::Get(engine::Context &ctx, const rocksdb::ReadOptions &o
630630
rocksdb::ColumnFamilyHandle *column_family, const rocksdb::Slice &key,
631631
rocksdb::PinnableSlice *value) {
632632
if (ctx.txn_context_enabled) {
633-
DCHECK_NOTNULL(options.snapshot);
633+
DCHECK_NE(options.snapshot, nullptr);
634634
DCHECK_EQ(ctx.GetSnapshot()->GetSequenceNumber(), options.snapshot->GetSequenceNumber());
635635
}
636636
rocksdb::Status s;
@@ -663,7 +663,7 @@ void Storage::recordKeyspaceStat(const rocksdb::ColumnFamilyHandle *column_famil
663663
rocksdb::Iterator *Storage::NewIterator(engine::Context &ctx, const rocksdb::ReadOptions &options,
664664
rocksdb::ColumnFamilyHandle *column_family) {
665665
if (ctx.txn_context_enabled) {
666-
DCHECK_NOTNULL(options.snapshot);
666+
DCHECK_NE(options.snapshot, nullptr);
667667
DCHECK_EQ(ctx.GetSnapshot()->GetSequenceNumber(), options.snapshot->GetSequenceNumber());
668668
}
669669
auto iter = db_->NewIterator(options, column_family);
@@ -679,7 +679,7 @@ void Storage::MultiGet(engine::Context &ctx, const rocksdb::ReadOptions &options
679679
rocksdb::ColumnFamilyHandle *column_family, const size_t num_keys, const rocksdb::Slice *keys,
680680
rocksdb::PinnableSlice *values, rocksdb::Status *statuses) {
681681
if (ctx.txn_context_enabled) {
682-
DCHECK_NOTNULL(options.snapshot);
682+
DCHECK_NE(options.snapshot, nullptr);
683683
DCHECK_EQ(ctx.GetSnapshot()->GetSequenceNumber(), options.snapshot->GetSequenceNumber());
684684
}
685685
if (is_txn_mode_ && txn_write_batch_->GetWriteBatch()->Count() > 0) {

0 commit comments

Comments
 (0)