Implement the engine-defined options corresponding to useful table
options, including (options marked as ++ are included only because
of the "keep" decision on the corresponding spider system variables
in MDEV-27228):
Many of these table params have a twin system variable. Examples
include read_only_mode, net_read_timeout etc. The natural
approach to these params is to use HA_TOPTION_SYSVAR macro,
which takes care of the value overriding. This is also a natural
continuation of spider sysvar tickets like MDEV-27169 and MDEV-31524. However, table options can not fall back dynamically to
the current sysvar value, so we have to keep the overriding/fallback
mechanism and use the string type (HA_TOPTION_STRING) for these
values, where we can encode unspecified as the null string.
There's also a temporary problem with unspecified non-string table
options. Given that we will keep connection string parsing by
COMMENT or CONNECTION until MDEV-31146, It makes sense as a part of
the changes for this ticket, to ignore COMMENT/CONNECTION parsing
when any table option is used. However, it is not possible to tell
whether a non-string type table option has been specified. We fix
this by making these options also string type (so all spider options
are of the string type) and if any of them is non-null (i.e.
specified), we ignore COMMENT/CONNECTION for parsing. An alternative
fix also considered was to make the COMMENT string parsing override
these table options. However, this is an inferior choice given
that 1. this increases complexity in overriding; 2. only six
relatively uncommon table options are not sysvars and not strings
(priority, query_cache, query_cache_sync, force_bulk_delete,
force_bulk_update, table_count_mode); 3. all params are already
supplied as strings (e.g. read_only_mode "1") in the existing
comment string parsing so no surprise to users if they remain
strings, and in create table statements strings do not need to be
quoted anyway; 4. users might want to use comments for comments.
Even though after this task there are MDEV-28861 and MDEV-31146 that
duplicate and remove connection info encoded in comments, there will
still be connection string parser in the spider codebase, for spider
udfs like spider_direct_sql and spider_copy_tables.
Regarding the choice of the table options in the list above, some
undocumented parameters have unclear purpose. It is not in the scope
of this ticket to try to document every one of them. Examples
include force_bulk_update, force_bulk_delete, table_count_mode. Also worth noting is the parameter delete_all_rows_type, which is buggy at 11.2 (MDEV-31996), but
on face value its purpose is clear, so we keep it for now.
Attachments
Issue Links
blocks
MDEV-28861Spider: Deprecate table options by COMMENT
Closed
causes
MDEV-32486Assertion `!trx->alloc_line_no[id] || trx->alloc_line_no[id] == line_no' failed in spider_alloc_mem_calc
Closed
MDEV-32558ERROR 1429 (base) versus crash [SIGSEGV in spider_create_conn] (28856 patch) and ERROR 12719 infinite loop (base) versus ERROR 12518 table is read only (patch) on optimized builds in CLI
Closed
includes
MDEV-32157Backport cleanup commits from MDEV-28856 to lower versions
Closed
MDEV-32234Missing spaces in Spider variable descriptions
Closed
is blocked by
MDEV-31117Spider UBSAN runtime error: applying non-zero offset x to null pointer in st_spider_param_string_parse::restore_delims
Closed
MDEV-32486Assertion `!trx->alloc_line_no[id] || trx->alloc_line_no[id] == line_no' failed in spider_alloc_mem_calc
Closed
relates to
MDEV-27228Deprecate Spider plugin variables that result in excessive tweak
Stalled
MDEV-27106Spider: specify connection to data node by engine-defined attributes
Closed
MDEV-32492SIGSEGV in spider_conn_first_link_idx and others on DELETE, INSERT and SELECT
Closed
MDEV-32557"ERROR 12501 (HY000): The connect info 'MYSQL' is invalid" not repeatable in MDEV-28856 branch
Closed
MDEV-32585ASAN: stack-buffer-overflow in get_defaults_options on SELECT
From the big switch in spider_parse_connect_info in spd_table.cc
at 11.2[1], I identified 107 table options the user can specify in a
spider connection string, annotated with their statuses:
+: to keep
++: to keep (mdev-27228)
/: deprecated
--: to deprecate (mdev-27228)
access_balances
active_link_count
auto_increment_mode++
bgs_first_read--
bgs_mode
bgs_second_read--
bka_engine--
bka_mode--
bka_table_name_types/
buffer_size/
bulk_size++
bulk_update_mode--
bulk_update_size++
casual_read--
connect_timeouts++
crd_bg_mode--
crd_interval--
crd_mode/
crd_sync/
crd_type/
crd_weight/
delete_all_rows_type
direct_dup_insert--
direct_order_limit--
error_read_mode--
error_write_mode--
first_read--
force_bulk_delete
force_bulk_update
init_sql_alloc_size/
internal_limit/
internal_offset/
internal_optimize--
internal_optimize_local--
key_hint
link_statuses
load_crd_at_startup--
load_sts_at_startup--
low_mem_read--
max_order--
monitoring_bg_flag
monitoring_bg_interval
monitoring_bg_kind
monitoring_binlog_pos_at_failing
monitoring_flag
monitoring_kind
monitoring_limit
monitoring_sid
multi_split_read++
net_read_timeouts++
net_write_timeouts++
priority
query_cache
query_cache_sync
quick_mode--
quick_page_byte--
quick_page_size--
read_only_mode++
read_rate
reset_sql_alloc--
scan_rate
second_read--
select_column_mode--
selupd_lock_mode--
semi_split_read--
semi_split_read_limit--
semi_table_lock/
semi_table_lock_conn/
server_names+
skip_default_condition--
skip_parallel_search++
split_read--
static_key_cardinality
static_link_ids
static_mean_rec_length
static_records_for_status
store_last_crd--
store_last_sts/
strict_group_bys--
sts_bg_mode--
sts_interval--
sts_mode/
sts_sync/
table_count_mode
tgt_dbs+
tgt_default_files
tgt_default_groups
tgt_drivers
tgt_dsns
tgt_filedsns
tgt_hosts+
tgt_passwords+
tgt_pk_names
tgt_ports+
tgt_sequence_names
tgt_sockets
tgt_ssl_capaths
tgt_ssl_cas
tgt_ssl_certs
tgt_ssl_ciphers
tgt_ssl_keys
tgt_ssl_vscs
tgt_table_names+
tgt_usernames+
tgt_wrappers+
use_pushdown_udf
use_table_charset--
Of the annotations:
a single + marks table options that should be kept for obvious
reasons, like remote table names and ports.
a doulbe ++ marks table options whose corresponding system variables
are marked in MDEV-27288 to keep. If the system variables
make sense as table options, then the decision to keep carries over
a / marks table optons that have already been deprecated. So we
can ignore them for this task
a double – marks table options whose corresponding system variables
are marked in MDEV-27288 to deprecate, but have not been deprecated
yet. Assuming the decision is correct, we can ignore these options
for this task too.
Removing the ones marked as deprecated to to be deprecated, we are
left with 58 table options, of which we need to make decisions on 50
of them (i.e. those not marked with a single +), whether to
implement each one of them as an engine defined option:
Yuchen Pei
added a comment - - edited From the big switch in spider_parse_connect_info in spd_table.cc
at 11.2 [1] , I identified 107 table options the user can specify in a
spider connection string, annotated with their statuses:
+: to keep
++: to keep (mdev-27228)
/: deprecated
--: to deprecate (mdev-27228)
access_balances
active_link_count
auto_increment_mode++
bgs_first_read--
bgs_mode
bgs_second_read--
bka_engine--
bka_mode--
bka_table_name_types/
buffer_size/
bulk_size++
bulk_update_mode--
bulk_update_size++
casual_read--
connect_timeouts++
crd_bg_mode--
crd_interval--
crd_mode/
crd_sync/
crd_type/
crd_weight/
delete_all_rows_type
direct_dup_insert--
direct_order_limit--
error_read_mode--
error_write_mode--
first_read--
force_bulk_delete
force_bulk_update
init_sql_alloc_size/
internal_limit/
internal_offset/
internal_optimize--
internal_optimize_local--
key_hint
link_statuses
load_crd_at_startup--
load_sts_at_startup--
low_mem_read--
max_order--
monitoring_bg_flag
monitoring_bg_interval
monitoring_bg_kind
monitoring_binlog_pos_at_failing
monitoring_flag
monitoring_kind
monitoring_limit
monitoring_sid
multi_split_read++
net_read_timeouts++
net_write_timeouts++
priority
query_cache
query_cache_sync
quick_mode--
quick_page_byte--
quick_page_size--
read_only_mode++
read_rate
reset_sql_alloc--
scan_rate
second_read--
select_column_mode--
selupd_lock_mode--
semi_split_read--
semi_split_read_limit--
semi_table_lock/
semi_table_lock_conn/
server_names+
skip_default_condition--
skip_parallel_search++
split_read--
static_key_cardinality
static_link_ids
static_mean_rec_length
static_records_for_status
store_last_crd--
store_last_sts/
strict_group_bys--
sts_bg_mode--
sts_interval--
sts_mode/
sts_sync/
table_count_mode
tgt_dbs+
tgt_default_files
tgt_default_groups
tgt_drivers
tgt_dsns
tgt_filedsns
tgt_hosts+
tgt_passwords+
tgt_pk_names
tgt_ports+
tgt_sequence_names
tgt_sockets
tgt_ssl_capaths
tgt_ssl_cas
tgt_ssl_certs
tgt_ssl_ciphers
tgt_ssl_keys
tgt_ssl_vscs
tgt_table_names+
tgt_usernames+
tgt_wrappers+
use_pushdown_udf
use_table_charset--
Of the annotations:
a single + marks table options that should be kept for obvious
reasons, like remote table names and ports.
a doulbe ++ marks table options whose corresponding system variables
are marked in MDEV-27288 to keep. If the system variables
make sense as table options, then the decision to keep carries over
a / marks table optons that have already been deprecated. So we
can ignore them for this task
a double – marks table options whose corresponding system variables
are marked in MDEV-27288 to deprecate, but have not been deprecated
yet. Assuming the decision is correct, we can ignore these options
for this task too.
Removing the ones marked as deprecated to to be deprecated, we are
left with 58 table options, of which we need to make decisions on 50
of them (i.e. those not marked with a single +), whether to
implement each one of them as an engine defined option:
+: to keep
++: to keep (mdev-27228)
access_balances
active_link_count
auto_increment_mode++
bgs_mode
bulk_size++
bulk_update_size++
connect_timeouts++
delete_all_rows_type
force_bulk_delete
force_bulk_update
key_hint
link_statuses
monitoring_bg_flag
monitoring_bg_interval
monitoring_bg_kind
monitoring_binlog_pos_at_failing
monitoring_flag
monitoring_kind
monitoring_limit
monitoring_sid
multi_split_read++
net_read_timeouts++
net_write_timeouts++
priority
query_cache
query_cache_sync
read_only_mode++
read_rate
scan_rate
server_names+
skip_parallel_search++
static_key_cardinality
static_link_ids
static_mean_rec_length
static_records_for_status
table_count_mode
tgt_dbs+
tgt_default_files
tgt_default_groups
tgt_drivers
tgt_dsns
tgt_filedsns
tgt_hosts+
tgt_passwords+
tgt_pk_names
tgt_ports+
tgt_sequence_names
tgt_sockets
tgt_ssl_capaths
tgt_ssl_cas
tgt_ssl_certs
tgt_ssl_ciphers
tgt_ssl_keys
tgt_ssl_vscs
tgt_table_names+
tgt_usernames+
tgt_wrappers+
use_pushdown_udf
[1] https://github.com/MariaDB/server/blob/4f39ae75606d0400d7d6a3fc5e2123d7aa244011/storage/spider/spd_table.cc#L2199
Yuchen Pei
added a comment - - edited As some background, there are roughly three kinds of spider
parameters:
system variables that are also table params, e.g.
read_only_mode and use_table_charset
system variables that are not table params, e.g.
spider_support_xa and supder_conn_recycle_mode
table params that are not system variables, e.g. all
spider_share fields prefixed with tgt_ like tgt_dbs , as
well as others like priority .
All spider system variables can be found in spd_params.cc , and
are documented at
< https://mariadb.com/kb/en/spider-server-system-variables/ >, whereas
all table params can be found in the big switch statement in
spd_table.cc mentioned in a previous comment, and are documented
at < https://mariadb.com/kb/en/spider-table-parameters/ >. The table
params documentation is rather incomplete, updating which is a
separate task.
I have been going through the table params one by one. The params monitoring_* seem to be only used with the function spider_ping_table_mon_from_table(), and they seem to be only
useful with the spider high availability feature, which has been
deprecated in MDEV-28479 and will be removed in MDEV-28862. When a
spider connection string involves multiple remotes (HA), and if a
query sent to a remote fails, spider_ping_table_mon_from_table()
will update the status of that remote to SPIDER_LINK_STATUS_NG, so
that if the query is retried it will not use this remote.
This can be iullstrated from the logs of one of almost identical
looking the ha tests, spider/bg.ha.
spider
--connection master_1
eval $MASTER_1_CHECK_HA_STATUS;
# query to dropped remote table fails
--error 12511
INSERTINTO ta_l (a, b, c) VALUES
(6, 'e', '2011-05-05 20:04:05');
# some inconsequential queries
...
# query to healthy remote table works
INSERTINTO ta_l (a, b, c) VALUES
(6, 'e', '2011-05-05 20:04:05');
Some supporting evidence to the above claim: only four spider tests
fail when we put an abort(); at the beginning of spider_ping_table_mon_from_table(), and only these tests use the
table param mkd (short for monitoring_kind), and all these
tests are HA tests.
Without HA, i.e. when each connection string has only one remote
table, there is no point in calling spider_ping_table_mon_from_table(), as we don't need to update the
status of various remotes, as there's no remote to fall back to.
In any case, I created a minimal test that exercises spider_ping_table_mon_from_table() without HA. As expected, the
use is trivial and redundant:
Based on this, I conclude that none the monitoring_* table params
should be converted to table options.
Some other HA related table params that should not be converted to
table options include access_balances, active_link_count and
link_status.
Yuchen Pei
added a comment - I have been going through the table params one by one. The params
monitoring_* seem to be only used with the function
spider_ping_table_mon_from_table() , and they seem to be only
useful with the spider high availability feature, which has been
deprecated in MDEV-28479 and will be removed in MDEV-28862 . When a
spider connection string involves multiple remotes (HA), and if a
query sent to a remote fails, spider_ping_table_mon_from_table()
will update the status of that remote to SPIDER_LINK_STATUS_NG, so
that if the query is retried it will not use this remote.
This can be iullstrated from the logs of one of almost identical
looking the ha tests, spider/bg.ha .
spider
--connection master_1
eval $MASTER_1_CHECK_HA_STATUS;
# query to dropped remote table fails
--error 12511
INSERT INTO ta_l (a, b, c) VALUES
(6, 'e' , '2011-05-05 20:04:05' );
# some inconsequential queries
...
# query to healthy remote table works
INSERT INTO ta_l (a, b, c) VALUES
(6, 'e' , '2011-05-05 20:04:05' );
Some supporting evidence to the above claim: only four spider tests
fail when we put an abort(); at the beginning of
spider_ping_table_mon_from_table() , and only these tests use the
table param mkd (short for monitoring_kind ), and all these
tests are HA tests.
Without HA, i.e. when each connection string has only one remote
table, there is no point in calling
spider_ping_table_mon_from_table() , as we don't need to update the
status of various remotes, as there's no remote to fall back to.
In any case, I created a minimal test that exercises
spider_ping_table_mon_from_table() without HA. As expected, the
use is trivial and redundant:
https://github.com/MariaDB/server/commit/322a0862082
Based on this, I conclude that none the monitoring_* table params
should be converted to table options.
Some other HA related table params that should not be converted to
table options include access_balances, active_link_count and
link_status.
Some more conclusions. As before, items marked with + means
keep/implement as table options, and those marked with - means
deprecated/do not implement as table options.
access_balances-: part of the deprecated HA feature
active_link_count-: part of the deprecated HA feature
auto_increment_mode+: used non-trivially in ha_spider::write_row()
bgs_mode+: whether to run queries on background threads, covered
in tests under the spider/bg suite
bulk_size+: accessed for spider->bulk_size, which is further
used in spider_db_bulk_insert() when inserting
bulk_update_size+: accessed for result_list.bulk_update_size,
which is further used in spider_db_bulk_update()
connect_timeouts+: passed in mysql_option to data node when
connecting
delete_all_rows_type+: whether to do fast delete or direct delete
when deleting all rows of a spider table. See also MDEV-31996
force_bulk_delete+: used to set a spider specific table flag
HA_CAN_FORCE_BULK_DELETE (added in 2017), which are further used
in Sql_cmd_update::update_single_table(). Pending documentation.
force_bulk_update+: same as force_bulk_delete
key_hint+: the idx000 as documented in
<https://mariadb.com/kb/en/spider-table-parameters/#idx000>, for
sending force/use/ignore index to data node. The 000 is supposed
to be the index of the index, i.e. 000 means the 0th index, 001
means the first index and so on. But it may be redundant and not
needed, see also MDEV-32000 and MDEV-32001.
priority+: used in commit and rollback, to determine which
connection (e.g. partition) to commit/rollback first. Funnily
enough, smaller means higher priority
query_cache+: works as documented, i.e. whether to pass [no_]query_cache in queries to data nodes
query_cache_sync+: whether to pass the [no_]query_cache in
queries from spider nodes to data nodes. We can probably combine
query_cache and query_cache_sync into one bitmap.
read_only_mode+: whether the spider table should be read only
and reject writes
static_link_ids-: used trivially (passing values around, system
table read-write etc.) in spider_get_ping_table_mon_list() and
friends
static_mean_rec_length-: passed onto ha_statistics::mean_rec_length when not -1, but itself is
always -1 with no real default value
static_records_for_status-: unused
table_count_mode+: for setting table flags
HA_STATS_RECORDS_IS_EXACT and HA_HAS_RECORDS
tgt_default_files+: same as connect_timeouts
tgt_default_groups+: same as connect_timeouts
tgt_drivers+: spider odbc
tgt_dsns+: spider odbc
tgt_filedsns+: spider odbc
tgt_hosts+: used in mysql_real_connect() for connecting to
data nodes
tgt_passwords+: same as tgt_hosts
tgt_pk_names-: a key name to check the key name in an
HA_ERR_FOUND_DUPP_KEY warning when inserting with
ignore/replace/update on duplication, in some very specific
circumstances. If the key name match, we get a more helpful
warning ER_DUP_ENTRY (1062), otherwise we get a more generic one
ER_DUP_KEY (1022). However the usefulness is limited, as it is
only used when the dup key is primary, in which case the key name
is always "PRIMARY"
tgt_ports+: same as tgt_hosts
tgt_sequence_names-: unused. previously used with some spider
oracle support which has now been deprecated
tgt_sockets+: same as tgt_hosts
tgt_ssl_*+: same as connect_timeouts
tgt_usernames+: same as tgt_hosts
tgt_wrappers+: the wrapper
use_pushdown_udf+: self-explanatory - whether to pushdown udf to
data nodes
Yuchen Pei
added a comment - - edited Some more conclusions. As before, items marked with + means
keep/implement as table options, and those marked with - means
deprecated/do not implement as table options.
access_balances- : part of the deprecated HA feature
active_link_count- : part of the deprecated HA feature
auto_increment_mode+ : used non-trivially in
ha_spider::write_row()
bgs_mode+ : whether to run queries on background threads, covered
in tests under the spider/bg suite
bulk_size+ : accessed for spider->bulk_size , which is further
used in spider_db_bulk_insert() when inserting
bulk_update_size+ : accessed for result_list.bulk_update_size ,
which is further used in spider_db_bulk_update()
connect_timeouts+ : passed in mysql_option to data node when
connecting
delete_all_rows_type+ : whether to do fast delete or direct delete
when deleting all rows of a spider table. See also MDEV-31996
force_bulk_delete+ : used to set a spider specific table flag
HA_CAN_FORCE_BULK_DELETE (added in 2017), which are further used
in Sql_cmd_update::update_single_table(). Pending documentation.
force_bulk_update+ : same as force_bulk_delete
key_hint+ : the idx000 as documented in
< https://mariadb.com/kb/en/spider-table-parameters/#idx000 >, for
sending force/use/ignore index to data node. The 000 is supposed
to be the index of the index, i.e. 000 means the 0th index, 001
means the first index and so on. But it may be redundant and not
needed, see also MDEV-32000 and MDEV-32001 .
link_statuses- : part of HA
monitoring_*- : see my previous comment
multi_split_read+ : not clear, but looks useful. See also
< https://mariadb.com/kb/en/spider-server-system-variables/#spider_multi_split_read >.
net_read_timeouts+ : same as connect_timeouts
net_write_timeouts+ : same as connect_timeouts
priority+ : used in commit and rollback, to determine which
connection (e.g. partition) to commit/rollback first. Funnily
enough, smaller means higher priority
query_cache+ : works as documented, i.e. whether to pass
[no_] query_cache in queries to data nodes
query_cache_sync+ : whether to pass the [no_] query_cache in
queries from spider nodes to data nodes. We can probably combine
query_cache and query_cache_sync into one bitmap.
read_only_mode+ : whether the spider table should be read only
and reject writes
read_rate- : unused in the code
scan_rate- : same as read_rate
skip_parallel_search+ : Not clear, but related to bgs mode and
accessed for ha_spider::use_pre_call which is further used in
the background thread. Looks useful. Pending further investigation
in a separate task. See also
< https://mariadb.com/kb/en/spider-server-system-variables/#spider_skip_parallel_search >.
static_key_cardinality- : unused
static_link_ids- : used trivially (passing values around, system
table read-write etc.) in spider_get_ping_table_mon_list() and
friends
static_mean_rec_length- : passed onto
ha_statistics::mean_rec_length when not -1, but itself is
always -1 with no real default value
static_records_for_status- : unused
table_count_mode+ : for setting table flags
HA_STATS_RECORDS_IS_EXACT and HA_HAS_RECORDS
tgt_default_files+ : same as connect_timeouts
tgt_default_groups+ : same as connect_timeouts
tgt_drivers+ : spider odbc
tgt_dsns+ : spider odbc
tgt_filedsns+ : spider odbc
tgt_hosts+ : used in mysql_real_connect() for connecting to
data nodes
tgt_passwords+ : same as tgt_hosts
tgt_pk_names- : a key name to check the key name in an
HA_ERR_FOUND_DUPP_KEY warning when inserting with
ignore/replace/update on duplication, in some very specific
circumstances. If the key name match, we get a more helpful
warning ER_DUP_ENTRY (1062), otherwise we get a more generic one
ER_DUP_KEY (1022). However the usefulness is limited, as it is
only used when the dup key is primary, in which case the key name
is always "PRIMARY"
tgt_ports+ : same as tgt_hosts
tgt_sequence_names- : unused. previously used with some spider
oracle support which has now been deprecated
tgt_sockets+ : same as tgt_hosts
tgt_ssl_*+ : same as connect_timeouts
tgt_usernames+ : same as tgt_hosts
tgt_wrappers+ : the wrapper
use_pushdown_udf+ : self-explanatory - whether to pushdown udf to
data nodes
I will clean up the commits, and if nothing new, I will generalise it
to all chosen params.
One thing to note is that we cannot determine if any options have been
specified because of how options associated with sysvars work. They
are added to option_list when the sysvar value is non-default.
This makes it impossible to determine whether the an option comes from
a SET statement (session level), or specified for the table (table
level). Given we are delaying deprecating the comment parsing to after MDEV-28856, the only solution is to let comment parsing override
option values.
The correct thing to do is to use the table level value 0 specified in
the comment. However, during the create table query, there no way to
tell whether option_struct->read_only (== 1) is set with a
Yuchen Pei
added a comment - I have a PoC implementation with read_only_mode at
https://github.com/MariaDB/server/commit/c81002c0595 .
I will clean up the commits, and if nothing new, I will generalise it
to all chosen params.
One thing to note is that we cannot determine if any options have been
specified because of how options associated with sysvars work. They
are added to option_list when the sysvar value is non-default.
This makes it impossible to determine whether the an option comes from
a SET statement (session level), or specified for the table (table
level). Given we are delaying deprecating the comment parsing to after
MDEV-28856 , the only solution is to let comment parsing override
option values.
Consider this case:
set session spider_read_only_mode = 1;
create table t1 (c int ) ENGINE=Spider COMMENT= 'read_only_mode "0", WRAPPER "mysql", srv "srv",TABLE "t2"' ;
The correct thing to do is to use the table level value 0 specified in
the comment. However, during the create table query, there no way to
tell whether option_struct->read_only (== 1) is set with a
SET SESSION spider_read_only_mode = 1
or as a create table option
SPIDER_READ_ONLY=1
See https://github.com/MariaDB/server/commit/42d8eb49eba with an
attempt to determine if any options have been specified.
The only way to guarantee this works is to let comment parsing
override table options, which is the approach taken in
https://github.com/MariaDB/server/commit/c81002c0595 .
Another issue I encountered is the apparent lack of namespace in
keywords parsing. It appears to me that engine-defined option keywords
cannot clash with existing server keyword. I learned it the hard way
when trying to understand the parsing error with READ_ONLY=1 (see the
testcase in [1]). The tokenizer checks existing keywords and does not
return IDENT when it finds READ_ONLY is an existing keyword in this
case. Either we need to prefix all spider engine-defined options with
say SPIDER_ to avoid polluting the "global namespace" with spider
table options, or update the parser so that engine defined options are
excluded from the check. In [2] I fixed it with a SPIDER_ prefix.
Yuchen Pei
added a comment - Another issue I encountered is the apparent lack of namespace in
keywords parsing. It appears to me that engine-defined option keywords
cannot clash with existing server keyword. I learned it the hard way
when trying to understand the parsing error with READ_ONLY=1 (see the
testcase in [1] ). The tokenizer checks existing keywords and does not
return IDENT when it finds READ_ONLY is an existing keyword in this
case. Either we need to prefix all spider engine-defined options with
say SPIDER_ to avoid polluting the "global namespace" with spider
table options, or update the parser so that engine defined options are
excluded from the check. In [2] I fixed it with a SPIDER_ prefix.
[1]
https://github.com/MariaDB/server/commit/6e7fabe5365#diff-9b8650c503ba8306771bd012fc3a7ae062aa04d769995545989401093416b0ad
[2] https://github.com/MariaDB/server/commit/8aeb70e8e40
Actually, we can't use the sysvar type (HA_TOPTION_SYSVAR) for
table options associated with a sysvar. This is because in Spider
these options, if not specified, should fallback to a dynamic
default, which is the current value of the sysvar. Whereas table
options are designed to be static, i.e. table option value should
stay the same regardless of changes in the sysvar.
Consider the following example (adapted and extracted from
sysvar_params.test from [1])
Both show create tables omit the SPIDER_READ_ONLY table options
because they have the default sysvar value 0. However the "dynamic""
value should be 1 in the second case, and the insertion should fail
accordingly.
(here we are able to insert because table options are ignored in this
case and only comment used)
This case also displays a related issue, that except for the string
type, table options do not support "not specified".
So we need to
1. Keep the dynamic fallback for spider table options that are also
sysvars
2. Either make all such options string type so that NULL means not
specified and to fallback to the sysvar, or update spider table
options design to allow "not specified". Given spider is probably
the only engine that requires such dynamic fallback, I'd go with
the "either" option rather than the "or" option.
Yuchen Pei
added a comment - Actually, we can't use the sysvar type ( HA_TOPTION_SYSVAR ) for
table options associated with a sysvar. This is because in Spider
these options, if not specified, should fallback to a dynamic
default, which is the current value of the sysvar. Whereas table
options are designed to be static , i.e. table option value should
stay the same regardless of changes in the sysvar.
Consider the following example (adapted and extracted from
sysvar_params.test from [1] )
set session spider_read_only_mode = default ;
create table t2 (c int );
create table t1 (c int ) ENGINE=Spider COMMENT= 'WRAPPER "mysql", srv "srv",TABLE "t2"' ;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c` int (11) DEFAULT NULL
) ENGINE=SPIDER DEFAULT CHARSET=latin1 COLLATE =latin1_swedish_ci COMMENT= 'WRAPPER "mysql", srv "srv",TABLE "t2"'
set session spider_read_only_mode = 1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c` int (11) DEFAULT NULL
) ENGINE=SPIDER DEFAULT CHARSET=latin1 COLLATE =latin1_swedish_ci COMMENT= 'WRAPPER "mysql", srv "srv",TABLE "t2"'
/* 1 */ insert into t1 values (42);
drop table t1, t2;
Both show create tables omit the SPIDER_READ_ONLY table options
because they have the default sysvar value 0. However the "dynamic""
value should be 1 in the second case, and the insertion should fail
accordingly.
The same problem occurs in the other case too:
set session spider_read_only_mode = 1;
create table t2 (c int );
create table t1 (c int ) ENGINE=Spider COMMENT= 'read_only_mode "0", WRAPPER "mysql", srv "srv",TABLE "t2"' ;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c` int (11) DEFAULT NULL
) ENGINE=SPIDER DEFAULT CHARSET=latin1 COLLATE =latin1_swedish_ci COMMENT= 'read_only_mode "0", WRAPPER "mysql", srv "srv",TABLE "t2"' `SPIDER_READ_ONLY`= 'ON'
set session spider_read_only_mode = 0;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c` int (11) DEFAULT NULL
) ENGINE=SPIDER DEFAULT CHARSET=latin1 COLLATE =latin1_swedish_ci COMMENT= 'read_only_mode "0", WRAPPER "mysql", srv "srv",TABLE "t2"' `SPIDER_READ_ONLY`= 'ON'
/* 5 */ insert into t1 values (42);
drop table t1, t2;
(here we are able to insert because table options are ignored in this
case and only comment used)
This case also displays a related issue, that except for the string
type, table options do not support "not specified".
So we need to
1. Keep the dynamic fallback for spider table options that are also
sysvars
2. Either make all such options string type so that NULL means not
specified and to fallback to the sysvar, or update spider table
options design to allow "not specified". Given spider is probably
the only engine that requires such dynamic fallback, I'd go with
the "either" option rather than the "or" option.
[1] https://github.com/MariaDB/server/commit/1bbab11f4e5
Here's the latest PoC patch with all the previous issues (keyword
namespace, unspecified options, show create table, multi-level
overriding, dynamic fallback to sysvar etc.) resolved:
Yuchen Pei
added a comment - Here's the latest PoC patch with all the previous issues (keyword
namespace, unspecified options, show create table, multi-level
overriding, dynamic fallback to sysvar etc.) resolved:
https://github.com/MariaDB/server/commit/eb97777b4ce
Will add other options if nothing new.
Yuchen Pei
added a comment - Here's the current patch implementing all the options specified in the
description.
https://github.com/MariaDB/server/commit/7904d8ea992
Here's a funny case where we cannot detect easily mixed use of
comment and table options:
CREATETABLE ... COMMENT='tbl "tbl_a"'
PARTITION BY RANGE (a) (
PARTITION p1 VALUES LESS THAN (3) COMMENT='srv "s_2_1"',
PARTITION p2 VALUES LESS THAN MAXVALUE REMOTE_SERVER="s_2_2"
);
In parsing the connection info for p1, the spider parser could only
see comments, notice that none of the options are set, so it parses
the comments. In parsing the connection info for p2, it notices
REMOTE_SERVER is specified, so it ignores COMMENT. This inconsistency
is temporary and will disappear after we remove comment parsing in MDEV-31146, so rather than trying to detect it, I suggest the solution
is to simply advise in documentation "Don't include connection info in
comment when using options or bad things may happen".
We could also add another boolean spider system variable spider_ignore_comment that defaults to false, but will default to
true in MDEV-28861.
Yuchen Pei
added a comment - - edited Here's a funny case where we cannot detect easily mixed use of
comment and table options:
CREATE TABLE ... COMMENT= 'tbl "tbl_a"'
PARTITION BY RANGE (a) (
PARTITION p1 VALUES LESS THAN (3) COMMENT= 'srv "s_2_1"' ,
PARTITION p2 VALUES LESS THAN MAXVALUE REMOTE_SERVER= "s_2_2"
);
In parsing the connection info for p1, the spider parser could only
see comments, notice that none of the options are set, so it parses
the comments. In parsing the connection info for p2, it notices
REMOTE_SERVER is specified, so it ignores COMMENT. This inconsistency
is temporary and will disappear after we remove comment parsing in
MDEV-31146 , so rather than trying to detect it, I suggest the solution
is to simply advise in documentation "Don't include connection info in
comment when using options or bad things may happen".
We could also add another boolean spider system variable
spider_ignore_comment that defaults to false, but will default to
true in MDEV-28861 .
Of these patches, the first and second ones are cleanups, documentations etc., and I intend to push them to the lowest possible version (e.g. 10.4) - please let me know if there are any problems.
The third commit is the actual patch adding the options, targeted for 11.3.
I would like to start work on MDEV-28861 asap, given this ticket has already made the choice of which params to not include in options, thus will be deprecated. But I will have to handle a couple other tasks first.
Yuchen Pei
added a comment - - edited Hi holyfoot , ptal thanks:
1. https://github.com/MariaDB/server/commit/56d8819a57f
2. https://github.com/MariaDB/server/commit/f4090a25024
3. https://github.com/MariaDB/server/commit/819271b559a
Of these patches, the first and second ones are cleanups, documentations etc., and I intend to push them to the lowest possible version (e.g. 10.4) - please let me know if there are any problems.
The third commit is the actual patch adding the options, targeted for 11.3.
I would like to start work on MDEV-28861 asap, given this ticket has already made the choice of which params to not include in options, thus will be deprecated. But I will have to handle a couple other tasks first.
Yuchen Pei
added a comment - - edited Thanks for the review holyfoot . Done and pushed the following to
preview-11.3-preview:
56bb5963314 * MDEV-28856 Add remaining Spider table options
ee558987043 * MDEV-28856 Spider: Tests, documentation, small fixes and cleanups
96db8963441 * MDEV-28856 Spider: drop server in tests
44a397feb9f * MDEV-31117 clean up spider connection info parsing
bdaff099945 * MDEV-31524 Fixing spider table param / variable overriding
The last two commits are needed because patches for respective tickets
had not reached 11.3 yet.
The commits in the current preview-11.3-preview branch are
a4031e4c051 * MDEV-28856 Add remaining Spider table options
53c9458c67e * MDEV-28856 Spider: Tests, documentation, small fixes and cleanups
ce1dc33e795 * MDEV-28856 Spider: drop server in tests
3c2ed2910a0 * MDEV-31117 clean up spider connection info parsing
7527a821d1b * MDEV-31524 Fixing spider table param / variable overriding
I have noticed an unusually high, continual, system load during testing of this feature (factor x10 approx compared with other runs). The source seems to be the mariadbd's being tested using significantly more CPU resources. ycp does any part of the patch represent a risk for performance degradation, unexpected looping, or similar? Also, the VIRT memory column in htop shows 40T for most processes which is a little concerning though may prove to be harmless.
Update: Issue was found to exist pre-patch also. Mentioned to axel to keep an eye out for it during preview-11-preview performance testing.
Roel Van de Paar
added a comment - - edited I have noticed an unusually high, continual, system load during testing of this feature (factor x10 approx compared with other runs). The source seems to be the mariadbd's being tested using significantly more CPU resources. ycp does any part of the patch represent a risk for performance degradation, unexpected looping, or similar? Also, the VIRT memory column in htop shows 40T for most processes which is a little concerning though may prove to be harmless.
Update: Issue was found to exist pre-patch also. Mentioned to axel to keep an eye out for it during preview-11-preview performance testing.
Created MDEV-32486 Assertion `!trx->alloc_line_no[id] || trx->alloc_line_no[id] == line_no' failed in spider_alloc_mem_calc
Roel Van de Paar
added a comment - Created MDEV-32486 Assertion `!trx->alloc_line_no [id] || trx->alloc_line_no [id] == line_no' failed in spider_alloc_mem_calc
Status update: many new issues were seen during the testing of this feature. Most of these were traced back to 1) missing MDEV-31524 and MDEV-30981 commits in the feature branch, 2) MDEV-32492 (and the iterations thereof, ref bug for details), which turned out to be a legacy bug which asserted itself more readily in the feature branch. The final re-test results of the updated branch of this feature (bb-11.3-mdev-28856-and-fixes) are near complete.
Roel Van de Paar
added a comment - - edited Status update: many new issues were seen during the testing of this feature. Most of these were traced back to 1) missing MDEV-31524 and MDEV-30981 commits in the feature branch, 2) MDEV-32492 (and the iterations thereof, ref bug for details), which turned out to be a legacy bug which asserted itself more readily in the feature branch. The final re-test results of the updated branch of this feature (bb-11.3-mdev-28856-and-fixes) are near complete.
Both MDEV-32558 (marked as duplicate of MDEV-32492 as the underlying issue is the same) as well as the newly created MDEV-32585 are bugs that show in optimized builds only. For MDEV-32558 after discussion we agreed it is acceptable to leave it and fix later in combination with MDEV-32492. MDEV-32585 is a WIP.
Roel Van de Paar
added a comment - Both MDEV-32558 (marked as duplicate of MDEV-32492 as the underlying issue is the same) as well as the newly created MDEV-32585 are bugs that show in optimized builds only. For MDEV-32558 after discussion we agreed it is acceptable to leave it and fix later in combination with MDEV-32492 . MDEV-32585 is a WIP.
Given the patches depend on the MDEV-31117 commits, the latter having
not yet reached 11.3 (highest version inclusion 11.1), the push is
blocked by the merge of 11.1->11.2->11.3.
Yuchen Pei
added a comment - Thanks for the testing Roel .
Given the patches depend on the MDEV-31117 commits, the latter having
not yet reached 11.3 (highest version inclusion 11.1), the push is
blocked by the merge of 11.1->11.2->11.3.
Yuchen Pei
added a comment - - edited squashed the following and pushed to 11.3 as 126157061b4376496c034a809ea4943e863d1465
cc08a83ef42 * MDEV-32486 Fix duplicate spider_bulk_malloc ID
99c3003ec78 * MDEV-32234 Fix missing space in Spider variable descriptions
80e4b349fc2 * MDEV-28856 fixes test to pass in --ps-protocol
a4031e4c051 * MDEV-28856 Add remaining Spider table options
People
Yuchen Pei
Nayuta Yanagisawa (Inactive)
Votes:
1Vote for this issue
Watchers:
9Start watching this issue
Dates
Created:
Updated:
Resolved:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":4561.800000190735,"ttfb":1659.3000001907349,"pageVisibility":"visible","entityId":111943,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0,"journeyId":"a965db7d-0a70-4a9d-b6ea-afb9d0c87b68","navigationType":0,"readyForUser":4739.5,"redirectCount":0,"resourceLoadedEnd":6048.300000190735,"resourceLoadedStart":1677.6999998092651,"resourceTiming":[{"duration":2251.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":1677.6999998092651,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1677.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":3929.199999809265,"responseStart":0,"secureConnectionStart":0},{"duration":2251.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/2bf333562ca6724060a9d5f1535471f6/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":1678,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1678,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":3929.5,"responseStart":0,"secureConnectionStart":0},{"duration":2258.0999994277954,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":1678.3000001907349,"connectEnd":1678.3000001907349,"connectStart":1678.3000001907349,"domainLookupEnd":1678.3000001907349,"domainLookupStart":1678.3000001907349,"fetchStart":1678.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":1678.3000001907349,"responseEnd":3936.3999996185303,"responseStart":3936.3999996185303,"secureConnectionStart":1678.3000001907349},{"duration":2375,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/2bf333562ca6724060a9d5f1535471f6/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":1679.5,"connectEnd":1679.5,"connectStart":1679.5,"domainLookupEnd":1679.5,"domainLookupStart":1679.5,"fetchStart":1679.5,"redirectEnd":0,"redirectStart":0,"requestStart":1679.5,"responseEnd":4054.5,"responseStart":4054.5,"secureConnectionStart":1679.5},{"duration":2378.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":1679.8000001907349,"connectEnd":1679.8000001907349,"connectStart":1679.8000001907349,"domainLookupEnd":1679.8000001907349,"domainLookupStart":1679.8000001907349,"fetchStart":1679.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":1679.8000001907349,"responseEnd":4058.300000190735,"responseStart":4058.300000190735,"secureConnectionStart":1679.8000001907349},{"duration":2392.8999996185303,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":1680,"connectEnd":1680,"connectStart":1680,"domainLookupEnd":1680,"domainLookupStart":1680,"fetchStart":1680,"redirectEnd":0,"redirectStart":0,"requestStart":1680,"responseEnd":4072.8999996185303,"responseStart":4072.8999996185303,"secureConnectionStart":1680},{"duration":2393.699999809265,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":1680.1999998092651,"connectEnd":1680.1999998092651,"connectStart":1680.1999998092651,"domainLookupEnd":1680.1999998092651,"domainLookupStart":1680.1999998092651,"fetchStart":1680.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":1680.1999998092651,"responseEnd":4073.8999996185303,"responseStart":4073.8999996185303,"secureConnectionStart":1680.1999998092651},{"duration":2437.699999809265,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":1680.3999996185303,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1680.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":4118.099999427795,"responseStart":0,"secureConnectionStart":0},{"duration":2394.1000003814697,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":1680.3999996185303,"connectEnd":1680.3999996185303,"connectStart":1680.3999996185303,"domainLookupEnd":1680.3999996185303,"domainLookupStart":1680.3999996185303,"fetchStart":1680.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":1680.3999996185303,"responseEnd":4074.5,"responseStart":4074.5,"secureConnectionStart":1680.3999996185303},{"duration":2437.300000190735,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":1681.1999998092651,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1681.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":4118.5,"responseStart":0,"secureConnectionStart":0},{"duration":2398.6000003814697,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":1681.3999996185303,"connectEnd":1681.3999996185303,"connectStart":1681.3999996185303,"domainLookupEnd":1681.3999996185303,"domainLookupStart":1681.3999996185303,"fetchStart":1681.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":1681.3999996185303,"responseEnd":4080,"responseStart":4080,"secureConnectionStart":1681.3999996185303},{"duration":3461,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":1683.3000001907349,"connectEnd":1683.3000001907349,"connectStart":1683.3000001907349,"domainLookupEnd":1683.3000001907349,"domainLookupStart":1683.3000001907349,"fetchStart":1683.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":1683.3000001907349,"responseEnd":5144.300000190735,"responseStart":5144.300000190735,"secureConnectionStart":1683.3000001907349},{"duration":4296,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":1752.3000001907349,"connectEnd":1752.3000001907349,"connectStart":1752.3000001907349,"domainLookupEnd":1752.3000001907349,"domainLookupStart":1752.3000001907349,"fetchStart":1752.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":1752.3000001907349,"responseEnd":6048.300000190735,"responseStart":6048.300000190735,"secureConnectionStart":1752.3000001907349},{"duration":1436,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":4150.800000190735,"connectEnd":4150.800000190735,"connectStart":4150.800000190735,"domainLookupEnd":4150.800000190735,"domainLookupStart":4150.800000190735,"fetchStart":4150.800000190735,"redirectEnd":0,"redirectStart":0,"requestStart":4150.800000190735,"responseEnd":5586.800000190735,"responseStart":5586.800000190735,"secureConnectionStart":4150.800000190735},{"duration":1594.1999998092651,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":4609,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":4609,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":6203.199999809265,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":1373,"responseStart":1659,"responseEnd":1750,"domLoading":1673,"domInteractive":6210,"domContentLoadedEventStart":6210,"domContentLoadedEventEnd":6392,"domComplete":7587,"loadEventStart":7587,"loadEventEnd":7587,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":6050.89999961853},{"name":"bigPipe.sidebar-id.end","time":6051.699999809265},{"name":"bigPipe.activity-panel-pipe-id.start","time":6051.89999961853},{"name":"bigPipe.activity-panel-pipe-id.end","time":6086.599999427795},{"name":"activityTabFullyLoaded","time":6447.599999427795}],"measures":[],"correlationId":"f7df757f5f50a","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":221,"dbReadsTimeInMs":38,"dbConnsTimeInMs":49,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
From the big switch in spider_parse_connect_info in spd_table.cc
at 11.2[1], I identified 107 table options the user can specify in a
spider connection string, annotated with their statuses:
+: to keep
++: to keep (mdev-27228)
/: deprecated
--: to deprecate (mdev-27228)
access_balances
active_link_count
auto_increment_mode++
bgs_first_read--
bgs_mode
bgs_second_read--
bka_engine--
bka_mode--
bka_table_name_types/
buffer_size/
bulk_size++
bulk_update_mode--
bulk_update_size++
casual_read--
connect_timeouts++
crd_bg_mode--
crd_interval--
crd_mode/
crd_sync/
crd_type/
crd_weight/
delete_all_rows_type
direct_dup_insert--
direct_order_limit--
error_read_mode--
error_write_mode--
first_read--
force_bulk_delete
force_bulk_update
init_sql_alloc_size/
internal_limit/
internal_offset/
internal_optimize--
internal_optimize_local--
key_hint
link_statuses
load_crd_at_startup--
load_sts_at_startup--
low_mem_read--
max_order--
monitoring_bg_flag
monitoring_bg_interval
monitoring_bg_kind
monitoring_binlog_pos_at_failing
monitoring_flag
monitoring_kind
monitoring_limit
monitoring_sid
multi_split_read++
net_read_timeouts++
net_write_timeouts++
priority
query_cache
query_cache_sync
quick_mode--
quick_page_byte--
quick_page_size--
read_only_mode++
read_rate
reset_sql_alloc--
scan_rate
second_read--
select_column_mode--
selupd_lock_mode--
semi_split_read--
semi_split_read_limit--
semi_table_lock/
semi_table_lock_conn/
server_names+
skip_default_condition--
skip_parallel_search++
split_read--
static_key_cardinality
static_link_ids
static_mean_rec_length
static_records_for_status
store_last_crd--
store_last_sts/
strict_group_bys--
sts_bg_mode--
sts_interval--
sts_mode/
sts_sync/
table_count_mode
tgt_dbs+
tgt_default_files
tgt_default_groups
tgt_drivers
tgt_dsns
tgt_filedsns
tgt_hosts+
tgt_passwords+
tgt_pk_names
tgt_ports+
tgt_sequence_names
tgt_sockets
tgt_ssl_capaths
tgt_ssl_cas
tgt_ssl_certs
tgt_ssl_ciphers
tgt_ssl_keys
tgt_ssl_vscs
tgt_table_names+
tgt_usernames+
tgt_wrappers+
use_pushdown_udf
use_table_charset--
Of the annotations:
reasons, like remote table names and ports.
are marked in MDEV-27288 to keep. If the system variables
make sense as table options, then the decision to keep carries over
can ignore them for this task
are marked in MDEV-27288 to deprecate, but have not been deprecated
yet. Assuming the decision is correct, we can ignore these options
for this task too.
Removing the ones marked as deprecated to to be deprecated, we are
left with 58 table options, of which we need to make decisions on 50
of them (i.e. those not marked with a single +), whether to
implement each one of them as an engine defined option:
+: to keep
++: to keep (mdev-27228)
access_balances
active_link_count
auto_increment_mode++
bgs_mode
bulk_size++
bulk_update_size++
connect_timeouts++
delete_all_rows_type
force_bulk_delete
force_bulk_update
key_hint
link_statuses
monitoring_bg_flag
monitoring_bg_interval
monitoring_bg_kind
monitoring_binlog_pos_at_failing
monitoring_flag
monitoring_kind
monitoring_limit
monitoring_sid
multi_split_read++
net_read_timeouts++
net_write_timeouts++
priority
query_cache
query_cache_sync
read_only_mode++
read_rate
scan_rate
server_names+
skip_parallel_search++
static_key_cardinality
static_link_ids
static_mean_rec_length
static_records_for_status
table_count_mode
tgt_dbs+
tgt_default_files
tgt_default_groups
tgt_drivers
tgt_dsns
tgt_filedsns
tgt_hosts+
tgt_passwords+
tgt_pk_names
tgt_ports+
tgt_sequence_names
tgt_sockets
tgt_ssl_capaths
tgt_ssl_cas
tgt_ssl_certs
tgt_ssl_ciphers
tgt_ssl_keys
tgt_ssl_vscs
tgt_table_names+
tgt_usernames+
tgt_wrappers+
use_pushdown_udf
[1] https://github.com/MariaDB/server/blob/4f39ae75606d0400d7d6a3fc5e2123d7aa244011/storage/spider/spd_table.cc#L2199