Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhelpful instruction for MariaDB #11734

Open
dveeden opened this issue Nov 8, 2024 · 7 comments
Open

Unhelpful instruction for MariaDB #11734

dveeden opened this issue Nov 8, 2024 · 7 comments
Labels
area/dm Issues or PRs related to DM. MariaDB This issue is found with MariaDB upstream severity/moderate type/bug The issue is confirmed as a bug.

Comments

@dveeden
Copy link
Contributor

dveeden commented Nov 8, 2024

What did you do?

Try to setup DM with MariaDB 11.4.2 as upstream

What did you expect to see?

No response

What did you see instead?

{
    "result": true,
    "msg": "",
    "sources": [
        {
            "result": false,
            "msg": "[code=38032:class=dm-master:scope=internal:level=high], Message: some error occurs in dm-worker: ErrCode:11001 ErrClass:\"functional\" ErrScope:\"internal\" ErrLevel:\"high\" Message:\"parse mydumper metadata error: [code=11123:class=functional:scope=upstream:level=low], Message: didn't found binlog location in dumped metadata file metadata, Workaround: Please check log of dump unit, there maybe errors when read upstream binlog status, metadata: Started dump at: 2024-11-08 16:30:53\\nSHOW BINARY LOG STATUS:\\n\\tLog: mysqld-bin.000002\\n\\tPos: 329\\n\\tGTID:\\n\\nFinished dump at: 2024-11-08 16:30:54\\n\" , Workaround: Please execute `query-status` to check status.",
            "source": "mysql-01",
            "worker": "127.0.0.1:8262"
        }
    ],
    "checkResult": "fail to check synchronization configuration with type: no errors but some warnings
    	detail: {
		"results": [
			{
				"id": 3,
				"name": "mysql_version",
				"desc": "check whether mysql version is satisfied",
				"state": "warn",
				"errors": [
					{
						"severity": "warn",
						"short_error": "Migrating from MariaDB is still experimental."
					}
				],
				"instruction": "It is recommended that you upgrade MariaDB to 10.1.2 or a later version.",
				"extra": "address of db instance - 127.0.0.1:3307"
			}
		],
		"summary": {
			"passed": true,
			"total": 13,
			"successful": 12,
			"failed": 0,
			"warning": 1
		}
	}"
}

Note the "It is recommended that you upgrade MariaDB to 10.1.2 or a later version.",

Versions of the cluster

master @ 64decf6

current status of DM cluster (execute query-status <task-name> in dmctl)

(paste current status of DM cluster here)
@dveeden dveeden added area/dm Issues or PRs related to DM. type/bug The issue is confirmed as a bug. labels Nov 8, 2024
@dveeden
Copy link
Contributor Author

dveeden commented Nov 8, 2024

Also looks like the output isn't valid JSON
cc @lance6716

@dveeden
Copy link
Contributor Author

dveeden commented Nov 8, 2024

/label MariaDB

@ti-chi-bot ti-chi-bot bot added the MariaDB This issue is found with MariaDB upstream label Nov 8, 2024
@lance6716
Copy link
Contributor

The instruction message is not clear. I think the purpose is not fixing the precheck warning after follows the instruction, but remind user to avoid using old MariaDB versions which have more problems 😂

Also looks like the output isn't valid JSON

Yes I checked the code, seems currect format is deliberately processed by PrettyPrintResponseWithCheckTask to provide visual readability 😂

@dveeden
Copy link
Contributor Author

dveeden commented Nov 11, 2024

@lance6716 can we fix this so the output is valid again? (and maybe add a test for that)

I guess we may have to create a custom Marshaler instead of doing text replacements on the output.

This somewhat reminds me of end_markers_in_json in MySQL.

mysql-9.1.0> explain format=json select 1\G
*************************** 1. row ***************************
EXPLAIN: {
  "query_block": {
    "select_id": 1,
    "message": "No tables used"
  }
}
1 row in set, 1 warning (0.00 sec)

mysql-9.1.0> set end_markers_in_json=on;
Query OK, 0 rows affected (0.00 sec)

mysql-9.1.0> explain format=json select 1\G
*************************** 1. row ***************************
EXPLAIN: {
  "query_block": {
    "select_id": 1,
    "message": "No tables used"
  } /* query_block */
}
1 row in set, 1 warning (0.00 sec)

Maybe the pretty printing should be a config option?

@lance6716
Copy link
Contributor

cc @alastori @OliverS929

@dveeden
Copy link
Contributor Author

dveeden commented Nov 11, 2024

To be clear. This issue is about the instruction not being helpful. I've created a separate issue for the output not being valid JSON

@fubinzh
Copy link

fubinzh commented Nov 12, 2024

/severity moderate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dm Issues or PRs related to DM. MariaDB This issue is found with MariaDB upstream severity/moderate type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

3 participants