Skip to content

Commit

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

fbshipit-source-id: 29a2cdee995
  • Loading branch information
spetrunia authored and inikep committed Sep 1, 2021
1 parent 0bc53e3 commit fa9ed8b
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 fa9ed8b

Please sign in to comment.