From fa9ed8bb478c80edc43f3bc89b8406908bcaaeec Mon Sep 17 00:00:00 2001 From: Sergei Petrunia Date: Thu, 6 Nov 2014 07:16:22 -0800 Subject: [PATCH] Issue #22: SELECT ... FOR UPDATE takes a long time - Specify the right column family when making a rocksdb::Get() call. fbshipit-source-id: 29a2cdee995 --- storage/rocksdb/ha_rocksdb.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/storage/rocksdb/ha_rocksdb.cc b/storage/rocksdb/ha_rocksdb.cc index 53eef8dd05cd..99b34dfa7b91 100644 --- a/storage/rocksdb/ha_rocksdb.cc +++ b/storage/rocksdb/ha_rocksdb.cc @@ -2553,7 +2553,8 @@ int ha_rocksdb::rnd_next_with_direction(uchar *buf, bool move_forward) bool found; if (!trx->changes.Get(key, &retrieved_record, &found)) { - rocksdb::Status s= rdb->Get(options, key, &retrieved_record); + rocksdb::Status s= rdb->Get(options, pk_descr->get_cf(), key, + &retrieved_record); found= !s.IsNotFound(); } @@ -2774,7 +2775,8 @@ int ha_rocksdb::update_row(const uchar *old_data, uchar *new_data) { rocksdb::ReadOptions options; /* Not setting options.snapshot, we need to check the real contents */ - rocksdb::Status s= rdb->Get(options, key_slice, &retrieved_record); + rocksdb::Status s= rdb->Get(options, pk_descr->get_cf(), key_slice, + &retrieved_record); found= !s.IsNotFound(); }