Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Clone in Desktop Download ZIP

Loading…

io_perf_start/io_perf_end_and_record calls are not matched #41

Closed
spetrunia opened this Issue · 2 comments

2 participants

@spetrunia
Collaborator

ha_rocksdb::index_read_map() calls io_perf_start() at function start, but then there are exits from the function that do not call io_perf_end_and_record().

One example scenario:

CREATE TABLE t1 (pk int, a int, PRIMARY KEY (pk), KEY(a) ) ENGINE=ROCKSDB; 

insert some rows into t1. Suppose, row with a=10 doesn't exist, row with a=11 does exist.

Then, run the query:

select * from t1 where a in (10,11);

And observe:

  Breakpoint 6, ha_rocksdb::io_perf_start (this=0x7fffa8009df0) at /home/psergey/dev-git/mysql-5.6-rocksdb-look-2/storage/rocksdb/ha_rocksdb.cc:2047
... 
  Breakpoint 6, ha_rocksdb::io_perf_start (this=0x7fffa8009df0) at /home/psergey/dev-git/mysql-5.6-rocksdb-look-2/storage/rocksdb/ha_rocksdb.cc:2047
...
  Breakpoint 7, ha_rocksdb::io_perf_end_and_record (this=0x7fffa8009df0) at /home/psergey/dev-git/mysql-5.6-rocksdb-look-2/storage/rocksdb/ha_rocksdb.cc:2056

The first hit is from index lookup for a=10
The other two are from lookup on a=11.

Note that the second call of breakpoint 6 wipes out the data collected since the first invocation.

@spetrunia spetrunia added the bug label
@hermanlee hermanlee was assigned by spetrunia
@hermanlee hermanlee was unassigned by spetrunia
@hermanlee
Owner

Thanks Sergei. Looks like I missed one exit point in the routine. I'll fix this.

@hermanlee
Owner

Should be resolved by https://reviews.facebook.net/D34653.

@hermanlee hermanlee closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.