[MDEV-27228] Deprecate Spider plugin variables that result in excessive tweak Created: 2021-12-11  Updated: 2023-12-07

Status: Stalled
Project: MariaDB Server
Component/s: Storage Engine - Spider
Fix Version/s: 10.4, 10.5, 10.6, 10.11, 11.0, 11.1

Type: Task Priority: Major
Reporter: Nayuta Yanagisawa (Inactive) Assignee: Yuchen Pei
Resolution: Unresolved Votes: 1
Labels: None

Issue Links:
Blocks
is blocked by MDEV-27730 Add PLUGIN_VAR_DEPRECATED flag to plu... Closed
Relates
relates to MDEV-27253 Reorganize Spider plugin variables re... Open
relates to MDEV-27255 Delete variables, deprecated by MDEV-... Stalled
relates to MDEV-28856 Spider: Implement more engine-defined... Closed
Sub-Tasks:
Key
Summary
Type
Status
Assignee
MDEV-27923 Deprecate spider_use_handler Technical task Closed Nayuta Yanagisawa  
MDEV-27925 Deprecate spider_connect_retry_count ... Technical task Open Yuchen Pei  
MDEV-27926 Deprecate spider_init_sql_alloc_size Technical task Closed Nayuta Yanagisawa  
MDEV-28007 Deprecate Spider plugin variables reg... Technical task Closed Nayuta Yanagisawa  
MDEV-28008 Deprecate spider_crd_mode and spider_... Technical task Closed  
MDEV-28009 Deprecate spider_table_crd_thread_cou... Technical task Closed Nayuta Yanagisawa  
MDEV-28010 Deprecate spider_crd_type and spider_... Technical task Closed Nayuta Yanagisawa  
MDEV-28244 Deprecate spider_xa_register_mode Technical task Closed Nayuta Yanagisawa  
MDEV-28297 Deprecate spider_internal_offset Technical task Closed Nayuta Yanagisawa  
MDEV-27981 Deprecate spider_internal_limit Technical task Closed Nayuta Yanagisawa  
MDEV-28005 Deprecate Spider plugin variables reg... Technical task Closed Nayuta Yanagisawa  
MDEV-28560 Deprecate spider_buffer_size Technical task Closed Nayuta Yanagisawa  
MDEV-28630 Deprecate spider_internal_optimize an... Technical task Open Yuchen Pei  
MDEV-28563 Deprecate spider_connect_error_interval Technical task Open Yuchen Pei  
MDEV-28564 Deprecate spider_local_lock_table Technical task Stalled Yuchen Pei  
MDEV-28793 Deprecate spider_use_all_conns_snapshot Technical task Open Yuchen Pei  
MDEV-28792 Deprecate _use_snapshot_with_flush_ta... Technical task Open Yuchen Pei  
MDEV-28794 Deprecate spider_use_consistent_snapshot Technical task Open Yuchen Pei  
MDEV-28795 Deprecate spider_bka_table_name_type Technical task Closed Nayuta Yanagisawa  
MDEV-28829 Deprecate spider_semi_table_lock and ... Technical task Closed Nayuta Yanagisawa  
MDEV-28847 Deprecate spider_sync_autocommit Technical task Open Yuchen Pei  
MDEV-28877 Deprecate spider_block_size Technical task Open Yuchen Pei  
MDEV-29032 Deprecate spider_reset_sql_alloc Technical task Open Yuchen Pei  
MDEV-31789 Deprecate spider_casual_read Technical task Open Yuchen Pei  

 Description   

Spider has so many plugin variables and some (most) of them result in excessive tweak. Deprecate such variables. We also need to deprecate the corresponding table parameters.

TODO:

  • List all variables to be deprecated
  • Check the list again (bolded are checked)
  • Deprecate them one by one

Docs:

x: deprecate, o: do not deprecate (at least now), empty: postpone judgment

Deprecate Variable Name Comment
o spider_auto_increment_mode  
x spider_bgs_first_read The best value should be specified by the developers.
  spider_bgs_mode  
x spider_bgs_second_read The best value should be specified by the developers.
x spider_bka_engine Always use MEMORY.
x spider_bka_mode  
MDEV-28795 spider_bka_table_name_type Flexibility on the table name is not necessary.
MDEV-28877 spider_block_size There is no need to change the block size.
MDEV-28560 spider_buffer_size This is used in nowhere in the codebase.
o spider_bulk_size Merge to spider_bulk_write_size
x spider_bulk_update_mode Always use bulk update/delete.
o spider_bulk_update_size Merge to spider_bulk_size
x spider_casual_read Insignificant but lot of complication but not fully sure. The value should be 1.
o spider_conn_recycle_mode One might want to disconnect every time. For example, for DNS based HA solutions.
x spider_conn_recycle_strict Looks not so useful.
o spider_conn_wait_timeout  
x spider_connect_error_interval Do not do this kind of back off at Spider.
x spider_connect_mutex No one use this.
MDEV-27925 spider_connect_retry_count Do not retry if it got too many connections.
MDEV-27925 spider_connect_retry_interval Do not retry if it got too many connections.
o spider_connect_timeout  
MDEV-27253 spider_crd_bg_mode  
MDEV-27253 spider_crd_interval  
MDEV-28008 spider_crd_mode  
MDEV-27253 spider_crd_sync  
MDEV-28010 spider_crd_type The best value should be choosen by the engine developer. Or, adjusted automatically.
MDEV-28010 spider_crd_weight The best value should be choosen by the engine developer. Or, adjusted automatically.
  spider_delete_all_rows_type Specify whether to use ha_spider::delete_all_rows() or not. Always use delte_all_rows().
x spider_direct_dup_insert Always do check on remote nodes.
x spider_direct_order_limit Always pushdown ORDER BY and LIMIT. The documentation is wrong.
o spider_dry_access https://github.com/Tencent/TenDBCluster-TSpider/commit/f0860e2b7d04582a5d00130b2963728ff4d3f9f9
x spider_error_read_mode How does this help users? > "Useful with applications that don't implement transaction replays."
x spider_error_write_mode The same as the above.
x spider_first_read The best value should be specified by the engine developers.
o spider_force_commit Not a good name.
o spider_general_log  
o spider_index_hint_pushdown  
MDEV-27926 spider_init_sql_alloc_size This shouldn't be exposed to users.
MDEV-27981 spider_internal_limit This doesn't look useful rather dangerous.
MDEV-28297 spider_internal_offset This doesn't look useful rather dangerous.
MDEV-28630 spider_internal_optimize Spider doesn't pushes down DDLs, so it seems to be natural not to pushdown table maintenance statements too.
MDEV-28630 spider_internal_optimize_local This should be merged to spider_internal_optimize at least or just deprecate.
x spider_internal_sql_log_off This seems to be for testing. Removing the vraible may affects the tests so much. In such a case, create a separated JIRA issue.
x spider_internal_unlock This specify whether Spider pass through UNLOCK TABLE to data nodes or not. I assume this is for internal use.
o spider_internal_xa  
x spider_internal_xa_id_type This should be specified by the engine developer.
  spider_internal_xa_snapshot  
MDEV-28007 spider_load_crd_at_startup  
MDEV-28007 spider_load_sts_at_startup  
MDEV-28564 spider_local_lock_table Do not use local locks.
x spider_lock_exchange How does this help users?
o spider_log_result_error_with_sql Merge to spider_log_level
o spider_log_result_errors Merge to spider_log_level
x spider_low_mem_read Avoid branching.
o spider_max_connections  
x spider_max_order When to use this?
o spider_multi_split_read  
o spider_net_read_timeout The default (table) value 600 seconds is too long and should be changed.
o spider_net_write_timeout The default (table) value 600 seconds is too long and should be changed.
o spider_ping_interval_at_trx_start  
x spider_quick_mode This variable might be deprecated too.
x spider_quick_page_byte  
x spider_quick_page_size  
o spider_read_only_mode  
o spider_remote_access_charset  
o spider_remote_autocommit  
o spider_remote_default_database  
o spider_remote_sql_log_off  
o spider_remote_time_zone  
o spider_remote_trx_isolation This might be able to be merged with spider_sync_trx_isolation
o spider_remote_wait_timeout  
MDEV-27228 spider_reset_sql_alloc I don't know why this is exposed to users.
o spider_same_server_link  
x spider_second_read The best value should be specified by the engine developers.
x spider_select_column_mode The best mode should be chosen by the engine developer. Here, the value should be 1.
x spider_selupd_lock_mode Setting local locks makes sense only when only a single Spider node is active.
x spider_semi_split_read https://tendbcluster.com/book-en/Documentation/re-book/tspider-parameter-en.html
x spider_semi_split_read_limit https://tendbcluster.com/book-en/Documentation/re-book/tspider-parameter-en.html
MDEV-28829 spider_semi_table_lock This result in poor performance. Almost everyone use transactional storage engines.
MDEV-28829 spider_semi_table_lock_connection  
x spider_semi_trx We deprecate this because semi-split read is depreacted too.
x spider_semi_trx_isolation Very bad name.
x spider_skip_default_condition Specify whether to skip the default case of the switch-case statement in open_item_func(). This looks a kind of a internal variable. Further, the default case should be always skiped for the safety. The variable is also used in the group by handler but it is not obvious how it affects the storage engine behavior. Thus, we do not delete this at this time.
o spider_skip_parallel_search Introduced by MariaDB 10.3.3. TSpider's default value is 3.
o spider_slave_trx_isolation Recently introduced by MDEV-16787.
x spider_split_read Not well-documented.
MDEV-28007 spider_store_last_crd  
MDEV-28007 spider_store_last_sts  
x spider_strict_group_by Always use strictly.
MDEV-27253 spider_sts_bg_mode  
MDEV-27253 spider_sts_interval  
MDEV-28008 spider_sts_mode  
MDEV-27253 spider_sts_sync  
  spider_support_xa Always support XA.
MDEV-28847 spider_sync_autocommit
x spider_sync_sql_mode Sync always.
o spider_sync_trx_isolation Not sure but might be useful when working with RDBMSs other than MariaDB.
MDEV-28009 spider_table_crd_thread_count  
MDEV-28563 spider_table_init_error_interval Spider should behave in the way of the variable is set to 0?
MDEV-28009 spider_table_sts_thread_count  
MDEV-28005 spider_udf_ct_bulk_insert_interval Use optional argument of the UDF.
MDEV-28005 spider_udf_ct_bulk_insert_rows Use optional argument of the UDF.
MDEV-28005 spider_udf_ds_bulk_insert_rows Use optional argument of the UDF.
MDEV-28005 spider_udf_ds_table_loop_mode  
MDEV-28005 spider_udf_ds_use_real_table  
MDEV-28005 spider_udf_table_lock_mutex_count Looks rather an internal variable.
MDEV-28005 spider_udf_table_mon_mutex_count Looks rather an internal variable.
MDEV-27228 spider_use_all_conns_snapshot This complicates the connection management.
x spider_use_cond_other_than_pk_for_update Specify whether to append non-primary key search conditions to a generated query. The variable seems to have been introduced for a temporal workaround for MDEV-16248. The issue is fixed for 10.4 or later, and thus there is no need to keep it.
MDEV-28794 spider_use_consistent_snapshot  
o spider_use_default_database  
x spider_use_flash_logs Spider doesn't pushes down DDLs, so it seems to be natural not to pushdown table maintenance statements too.
MDEV-27923 spider_use_handler Converting SQL statements to HANDLER statements may improve performance in some case. However, the performance gain seems not to be very significant and this complicates the implementation. Setting spider_use_handler > 0 disables the GROUP BY handler.
  spider_use_pushdown_udf  
MDEV-28792 spider_use_snapshot_with_flush_tables This complicates the connection management.
x spider_use_table_charset Always use table charset.
o spider_version  
o spider_wait_timeout  
MDEV-28244 spider_xa_register_mode The variable only affects the internal XA transactions.


 Comments   
Comment by Sergei Golubchik [ 2021-12-13 ]

We need to deprecate a variable before removing. But generally you can deprecate in 10.7 or 10.6, it does not break compatibility.
Still, I'd suggest to wait a bit after deprecating, in case some users will dearly need them and will complain.
It's not very likely, the absolute majority of users do not change defaults, but possible.

Comment by Nayuta Yanagisawa (Inactive) [ 2022-02-08 ]

serg Is it OK to remove variables in the unreleased version, say 10.9, without deprecating it?

Comment by Sergei Golubchik [ 2022-02-08 ]

In this case — I think yes, but you should still mark them deprecated in 10.7 or 10.6. And remove in, say, 10.9.

Comment by Nayuta Yanagisawa (Inactive) [ 2022-02-08 ]

OK. Thank you.

Comment by Yuchen Pei [ 2023-07-28 ]

> x spider_casual_read Insignificant but lot of complication but not fully sure. The value should be 1.

I think it should be 0, see my comment in MDEV-26151.

Generated at Thu Feb 08 09:51:19 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.