| 1 |
-- source include/have_ndb.inc |
| 2 |
|
| 3 |
# For locked reads primary will be used, for unlocked reads primary or |
| 4 |
# backup may be used. |
| 5 |
|
| 6 |
--let $KEYS=40 |
| 7 |
--let $TEST_STEP=5 |
| 8 |
|
| 9 |
# Classic table |
| 10 |
--let $comment=NDB_TABLE=READ_BACKUP=0,FULLY_REPLICATED=0 |
| 11 |
--let $expect=Classic distribution, always PRIMARY |
| 12 |
--source ndb_read_balance.inc |
| 13 |
|
| 14 |
# Read Backup table |
| 15 |
# Force O_P_L_P_N to get Primaries on both nodes, pending |
| 16 |
# fix to primary node balance. |
| 17 |
--let $comment=NDB_TABLE=READ_BACKUP=1,PARTITION_BALANCE=FOR_RP_BY_LDM |
| 18 |
--let $expect=Read Backup, Mix of Primary + Backup, except where locks are used |
| 19 |
--source ndb_read_balance.inc |
| 20 |
|
| 21 |
# Fully replicated table |
| 22 |
--let $comment=NDB_TABLE=FULLY_REPLICATED=1 |
| 23 |
--let $expect=Fully replicated, Mix of Primary + Backup, except where locks are used |
| 24 |
--source ndb_read_balance.inc |
| 25 |
|
| 26 |
# Potential TODO : |
| 27 |
# - Add hinted OI scan too ?? Requires composite primary key... |
| 28 |
# - Balance when Backup ! local |
| 29 |
# - Look at balance across nodes, LDMs, NGs etc... |
| 30 |
# For updates + reads |
| 31 |
# - Look at RB aspects, that we *do* RB |
| 32 |
# - Read *all* in one trans, expect some RB? |
| 33 |
# - Map rows to fragments to help? |
| 34 |
# - 2 node / NG-local reads, always local to node? |
| 35 |
# - NG !local reads, balanced? |
| 36 |
# - Map rows to 'Primary', 'Backup' (row, primary node, backup node) |
| 37 |
# - Determine nodegroups (distinct (a<b:a:b), (a<b:b:a)) |
| 38 |
# - Read rows in a single nodegroup...check purely local... |
| 39 |
|