[MDEV-11844] Useless or duplicate error messages on log_warnings level 2 Created: 2017-01-19  Updated: 2017-01-19

Status: Open
Project: MariaDB Server
Component/s: Replication, Server
Affects Version/s: 5.5, 10.0, 10.1, 10.2
Fix Version/s: 10.2

Type: Bug Priority: Minor
Reporter: Elena Stepanova Assignee: Sergei Golubchik
Resolution: Unresolved Votes: 1
Labels: None


 Description   

On level log_warnings=2 server can produce these error messages:

2017-01-19 19:52:57 140586966532864 [ERROR] mysqld: Can't find record in 't1'

I know it to happen when a slave doesn't find records referenced in a row event; not sure if there are other scenarios when it's produced.

It is an ERROR, which assumes the user is expected to do something about it, but the message itself is useless – it doesn't specify the query or even that caused it, or the record that wasn't found, or the connection that caused the error, or the action that can be taken. When it comes with replication, the slave would also produce an error (or warning, depending on slave_exec_mode ). This message contains more information and can be used to identify the problem:

2017-01-19 19:49:04 140680449477376 [ERROR] mysqld: Can't find record in 't1'
2017-01-19 19:49:04 140680449477376 [Warning] Slave SQL: Could not execute Delete_rows_v1 event on table test.t1; Can't find record in 't1', Error_code: 1032; handler error HA_ERR_END_OF_FILE; the event's master log master-bin.000001, end_log_pos 743, Gtid 0-1-3, Internal MariaDB error code: 1032

Thus, at least in replication scenario the error is redundant.

Since in 10.2 we are switching to log_warnings=2 by default, there will be many more users to encounter these messages and raise questions about them. So, I think it might be a good time to sort them out:

  • if they can only appear on a replication slave, get rid of them altogether, because they are just a inferior duplicate of what slave produces;
  • if they can also appear in other scenarios, improve them to provide something that a user can work with.

Same is true for

2017-01-19 20:16:40 140713757172480 [ERROR] mysqld: Deadlock found when trying to get lock; try restarting transaction


This message exists on level 1, I suppose it's not needed on level 2:

level 1

2017-01-19 20:34:58 140456210338560 [ERROR] mysqld: Table './test/t1' is marked as crashed and should be repaired

level 2

2017-01-19 20:35:37 139816564171520 [ERROR] mysqld: Table './test/t1' is marked as crashed and should be repaired
2017-01-19 20:35:37 139816564171520 [ERROR] mysqld: Table 't1' is marked as crashed and should be repaired



 Comments   
Comment by Elena Stepanova [ 2017-01-19 ]

Here is an example of a helpful message, also produced on the level 2:

2017-01-19 20:25:39 140492660380416 [Warning] Sort aborted, host: localhost, user: root, thread: 3, query: DELETE FROM t1 ORDER BY (f1(10)) LIMIT 1

Generated at Thu Feb 08 07:53:05 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.