[MDEV-32806] aria_chk -r cannot work on default system tables as aria_sort_buffer_size too small Created: 2023-11-15  Updated: 2023-11-15

Status: Open
Project: MariaDB Server
Component/s: Storage Engine - Aria
Affects Version/s: 10.4.32
Fix Version/s: 10.4

Type: Bug Priority: Major
Reporter: Daniel Black Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: Papercut


 Description   

https://stackoverflow.com/questions/77484689/xampp-mysql-crashed-during-editing-elementor-page-and-now-wont-restart

2023-11-14 16:18:28 0 [Note] Starting MariaDB 10.4.28-MariaDB source revision c8f2e9a5c0ac5905f28b050b7df5a9ffd914b7e7 as process 24412
Cannot find checkpoint record at LSN (1,0x5c4d)
2023-11-14 16:18:28 0 [ERROR] mysqld.exe: Aria recovery failed. Please run aria_chk -r on all Aria tables and delete all aria_log.######## files
2023-11-14 16:18:28 0 [ERROR] Plugin 'Aria' init function returned error.
2023-11-14 16:18:28 0 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.

From below the summary of problems is:

  • Fails to correctly recover all files by default.
  • Recommendations are vague (confusing message about -f -o -q)
  • Logical solution based on error message, increase sort buffer has no effect.
  • Unobvious options (-f -f) needed to be used for it to process.
  • deleting aria_log.* should be part of the tool rather than a server recommendation for the user to follow.

 ~/repos/build-mariadb-server-10.4/./storage/maria/aria_chk -r  */*.MAI
- recovering (with sort) Aria-table 'mysql/columns_priv.MAI'
Data records: 0
- Fixing index 1
aria_chk: error: aria_sort_buffer_size is too small. Current aria_sort_buffer_size: 16384  rows: 234  sort_length: 1006
aria_chk: error: Create index by sort failed
State updated
Aria table 'mysql/columns_priv.MAI' is not fixed because of errors
Try fixing it by using the --safe-recover (-o), the --force (-f) option or by not using the --quick (-q) flag
 
---------
...
- recovering (with sort) Aria-table 'mysql/help_topic.MAI'
Data records: 0
- Fixing index 1
aria_chk: error: aria_sort_buffer_size is too small. Current aria_sort_buffer_size: 16384  rows: 152917  sort_length: 9
aria_chk: error: Create index by sort failed
State updated
Aria table 'mysql/help_topic.MAI' is not fixed because of errors
Try fixing it by using the --safe-recover (-o), the --force (-f) option or by not using the --quick (-q) flag
 
- recovering (with sort) Aria-table 'mysql/proxies_priv.MAI'
Data records: 3
- Fixing index 1
aria_chk: error: aria_sort_buffer_size is too small. Current aria_sort_buffer_size: 16384  rows: 468  sort_length: 849
aria_chk: error: Create index by sort failed
State updated
Aria table 'mysql/proxies_priv.MAI' is not fixed because of errors
Try fixing it by using the --safe-recover (-o), the --force (-f) option or by not using the --quick (-q) flag
 
- recovering (with sort) Aria-table 'mysql/tables_priv.MAI'
Data records: 1
- Fixing index 1
aria_chk: error: aria_sort_buffer_size is too small. Current aria_sort_buffer_size: 16384  rows: 468  sort_length: 813
aria_chk: error: Create index by sort failed
State updated
Aria table 'mysql/tables_priv.MAI' is not fixed because of errors
Try fixing it by using the --safe-recover (-o), the --force (-f) option or by not using the --quick (-q) flag

adding larger sort buffer not reflected in output.

$ ~/repos/build-mariadb-server-10.4/./storage/maria/aria_chk --no-defaults --sort-buffer-size=$(( 2 * 1024 * 1024 * 1024 ))   -r  */*.MAI
- recovering (with sort) Aria-table 'mysql/columns_priv.MAI'
Data records: 0
- Fixing index 1
aria_chk: error: aria_sort_buffer_size is too small. Current aria_sort_buffer_size: 16384  rows: 234  sort_length: 1006


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