Skip to content

Commit

Permalink
Issue #22: SELECT ... FOR UPDATE takes a long time - Specify the righ…
Browse files Browse the repository at this point in the history
…t column family when making a rocksdb::Get() call.

fbshipit-source-id: f528c4c
  • Loading branch information
spetrunia authored and facebook-github-bot committed Dec 23, 2019
1 parent c172c69 commit 9f61583
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions storage/rocksdb/ha_rocksdb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down Expand Up @@ -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();
}

Expand Down

0 comments on commit 9f61583

Please sign in to comment.