Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.

Commit

Permalink
Wrong argument was passed to Apply_changes_iter::init()
Browse files Browse the repository at this point in the history
Summary:
Apply_changes_iter::init() function takes "bool is_reverse_arg"
as a first argument, but actually RDBSE_KEYDEF was passed from
ha_rocksdb::setup_index_scan(). So is_reverse_arg was
always true, and RocksDB SE did always reverse index scan,
and it also broke Apply_changes_iter behavior.
This diff passes correct variable (keydef->is_reverse_cf),
and with this fix, I confirmed bug#19 fixed.

Test Plan: mtr --suite=rocksdb, including rocksdb.transaction

Reviewers: sergey.petrunya.9, hermanlee4, maykov, jonahcohen

Reviewed By: jonahcohen

Subscribers: jtolmer

Differential Revision: https://reviews.facebook.net/D31551
  • Loading branch information
yoshinorim authored and Herman Lee committed Aug 27, 2015
1 parent dc0e2f3 commit e692b9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion storage/rocksdb/ha_rocksdb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2889,7 +2889,7 @@ void ha_rocksdb::setup_index_scan(RDBSE_KEYDEF *keydef,
options.snapshot= trx->snapshot;
rocksdb::Iterator* rocksdb_it= rdb->NewIterator(options, keydef->get_cf());
scan_it= new Apply_changes_iter;
scan_it->init(keydef, &trx->changes, rocksdb_it);
scan_it->init(keydef->is_reverse_cf, &trx->changes, rocksdb_it);
}

/*
Expand Down

0 comments on commit e692b9e

Please sign in to comment.