Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
f5d34eb
This adds a global my.cnf parameter, rocksdb_use_range_locking.
spetrunia May 17, 2021
8e95a13
Range Locking: get tests to pass: select_count_for_update, skip_Locke…
spetrunia Jul 19, 2021
8ab66dd
Address review input part #1
spetrunia Jul 19, 2021
48b2fbc
Address review input part 2
spetrunia Jul 19, 2021
cb26ac7
Address review input part #3
spetrunia Jul 26, 2021
83734ab
Address review input part #4: add comment, fix coding style
spetrunia Jul 26, 2021
ea8531f
Range Locking: don't lock ranges when using READ COMMITTED isolation …
spetrunia Jul 26, 2021
48e1eda
Range Locking: make LockingIterator not lock the same range twice.
spetrunia Jul 26, 2021
56863b1
Address review input part #1
spetrunia Aug 8, 2021
ccf38af
Address review input: lock the "gap" after the last row that was read
spetrunia Aug 9, 2021
69c31c8
With range locking, m_row_lock_count is incremented by 1 for each range
spetrunia Aug 16, 2021
2d75d8c
Update rocksdb.trx_info test
spetrunia Aug 16, 2021
5a5c473
Initialize ha_rocksdb::m_use_range_locking.
spetrunia Aug 16, 2021
45e4b3e
Make LockingIterator work when rocksdb_enable_iterate_bounds=off
spetrunia Aug 16, 2021
332b090
Fix a typo
spetrunia Aug 16, 2021
e1aee41
Range Locking: READ COMMITTED doesnt take range locks but should stil…
spetrunia Aug 16, 2021
2dc553b
Code cleanup: Make LockingIterator's methods accept direction as para…
spetrunia Aug 22, 2021
a234810
Range Locking: SELECT ... LOCK IN SHARE MODE should skip snapshot, too.
spetrunia Aug 22, 2021
8c6c1b8
Range Locking: Move locking secondary keys to right place
spetrunia Aug 23, 2021
9f29d70
Range Locking: Make partial index support LockingIterator.
spetrunia Sep 13, 2021
fe8771c
Remove out-of-date comment.
spetrunia Oct 11, 2021
a3f4612
An attempt at concurrent test for Range Locking
spetrunia Nov 1, 2021
3eb7c19
Small fixes in range_locking_conc_test
spetrunia Nov 8, 2021
522d693
range_locking_conc_test: if we found and deleted a group, create a ne…
spetrunia Nov 8, 2021
81dff7a
Update range_locking_conc_test.test
spetrunia Nov 8, 2021
8258196
range_locking_conc_test: Do the requested number of operations
spetrunia Nov 8, 2021
620c9a6
Code cleanup
spetrunia Nov 22, 2021
e625da0
range_locking_conc_test.py: group creation shouldn't just rollback
spetrunia Nov 22, 2021
dd5f88b
range_locking_conc_test: fixes to achieve greater contention
spetrunia Nov 22, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions mysql-test/suite/rocksdb/combinations
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ rocksdb_write_policy=write_prepared
[write_unprepared]
rocksdb_write_policy=write_unprepared
rocksdb_write_batch_flush_threshold=1

[range_locking]
rocksdb_use_range_locking=1
3 changes: 3 additions & 0 deletions mysql-test/suite/rocksdb/include/have_range_locking.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
if (`select count(*) = 0 from performance_schema.session_variables where variable_name = 'rocksdb_use_range_locking' and variable_value = 'ON';`) {
--skip Test requires range locking
}
5 changes: 5 additions & 0 deletions mysql-test/suite/rocksdb/include/not_range_locking.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
--let $_use_range_locking= `select @@rocksdb_use_range_locking`
if ($_use_range_locking == 1)
{
--skip Test doesn't support range locking
}
99 changes: 99 additions & 0 deletions mysql-test/suite/rocksdb/include/select_from_is_rowlocks.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
--echo # select * from information_schema.rocksdb_locks; # With replacements by select_from_is_rowlocks.inc
#
# An include to print contents of I_S.ROCKSB_LOCKS
#
# Implicit "parameters"
# - Currently it prints locks on t1.PRIMARY
#
# Explicit "parameter" variables:
# - $TRX1_ID - print this transaction as "TRX1"
# - $TRX2_ID - print this transaction as "TRX2"
#
# - $select_from_is_rowlocks_current_trx_only
# - $order_by_rowkey
#
# - $SECOND_INDEX_NAME

--disable_query_log
set @cf_id=(select column_family from information_schema.rocksdb_ddl
where table_name='t1' and index_name='PRIMARY');
set @rtrx_id=(select transaction_id from information_schema.rocksdb_trx
where thread_id=connection_id());
set @indexnr= (select lower(lpad(hex(index_number),8,'0')) from information_schema.rocksdb_ddl
where table_name='t1' and index_name='PRIMARY');

set @indexnr_next= (select lower(lpad(hex(index_number+1),8,'0'))
from information_schema.rocksdb_ddl
where table_name='t1' and index_name='PRIMARY');

let $extra_where = where 1;

if ($select_from_is_rowlocks_current_trx_only)
{
let $extra_where = where transaction_id=(select transaction_id from information_schema.rocksdb_trx where connection_id()=thread_id);
}

## transaction column

# If TRX1_ID is not specified, get the current transaction:
let $transaction_col= replace(transaction_id, @rtrx_id, "\$trx_id");
if ($TRX1_ID)
{
let $transaction_col = replace(transaction_id, '$TRX1_ID', "\$TRX1_ID");
}

if ($TRX2_ID)
{
let $transaction_col = replace($transaction_col, '$TRX2_ID', "\$TRX2_ID");
}

## CF_ID column
let $cf_id_col= column_family_id;

if ($SECOND_INDEX_NAME)
{
eval set @cf2_id=(select column_family from information_schema.rocksdb_ddl
where table_name='t1' and index_name='$SECOND_INDEX_NAME');

let $cf_id_col= replace($cf_id_col, @cf2_id, "\$cf2_id");
}
let $cf_id_col= replace($cf_id_col, @cf_id, "\$cf_id");

## KEY column
let $key_col= (`key`);
if ($SECOND_INDEX_NAME)
{
eval set @indexnr2= (select lower(lpad(hex(index_number),8,'0'))
from information_schema.rocksdb_ddl
where table_name='t1' and index_name='$SECOND_INDEX_NAME');

eval set @indexnr2_next= (select lower(lpad(hex(index_number+1),8,'0'))
from information_schema.rocksdb_ddl
where table_name='t1' and index_name='$SECOND_INDEX_NAME');

let $key_col = replace($key_col, @indexnr2, '\${indexnr2}');
let $key_col = replace($key_col, @indexnr2_next, '\${indexnr2+1}');
}

let $key_col = replace($key_col, @indexnr, '\${indexnr}');
let $key_col = replace($key_col, @indexnr_next, '\${indexnr+1}');

## ORDER BY
if ($order_by_rowkey)
{
let $extra_order_by = ORDER BY 3,2;
}

if (!$order_by_rowkey)
{
--sorted_result
}

eval select
$cf_id_col as COLUMN_FAMILY_ID,
$transaction_col as TRANSACTION_ID,
$key_col as `KEY`,
mode
from information_schema.rocksdb_locks $extra_where $extra_order_by;

--enable_query_log
Loading