Hi! On Tue, Mar 5, 2024 at 1:47 AM Sergei Golubchik <serg@mariadb.org> wrote:
Hi, Michael,
<cut>
to be read on socket. This is only used in semi sync master to speed up handling zero size packages that seams to happen from time to time.
"seems"
I don't understand why it happens and whether it's normal or not, and if normal, why it's normal only for semisync and not normal otherwise.
I changed the code to assume that when recv() returns 0 and errno = 0 this is actually a communication error. This fixed the issues and I could remove the flag. <cut>
+++ b/mysql-test/mariadb-test-run.pl @@ -4486,6 +4486,11 @@ sub extract_warning_lines ($$) { qr/Slave I\/0: Master command COM_BINLOG_DUMP failed/, qr/Error reading packet/, qr/Lost connection to MariaDB server at 'reading initial communication packet'/, + qr/Could not read packet:.* state: [2-3] /, + qr/Could not read packet:.* errno: 104 /, + qr/Could not write packet:.* errno: 32 /, + qr/Could not write packet:.* errno: 104 /, + qr/Connection was killed/,
why are these errors "normal" and can be ignored?
These are only printed as part of 'extended logging' when using --log-warnings=4 and used to produce extra information (not errors) why things happens. Many of the errors are also depending on timing so it is better to suppress them. We also do not have any other option than suppress these, as they are not part of any result set. <cut>
--- a/mysql-test/suite/rpl/include/rpl_extra_col_master.test +++ b/mysql-test/suite/rpl/include/rpl_extra_col_master.test @@ -59,6 +59,10 @@ #VARCHAR(M) #
+--disable_query_log +call mtr.add_suppression("Could not read packet:.* errno: 11"); +--enable_query_log
error 11? "Resource temporarily unavailable"? What does it mean in this context?
mtr --mysqld=--log-warnings=4 rpl_extra_col_master_innodb Produces 3 lines on the master and 12 times on the slave of type: var/log/mysqld.2.err:2024-03-05 20:10:34 6 [ERROR] mariadbd: Could not read packet: fd: 68 state: 2 remain: 4 errno: 11 vio_errno: 1158 length: 0 This comes from killing connections and disconnecting slaves in the test Probably that the connection as
+ --let $_saved_conn= $CURRENT_CONNECTION
let $binformat = `SHOW VARIABLES LIKE '%binlog_format%'`; diff --git a/sql/semisync_master_ack_receiver.cc b/sql/semisync_master_ack_receiver.cc index 9320c7fc3e6..1bb462ef934 100644 --- a/sql/semisync_master_ack_receiver.cc +++ b/sql/semisync_master_ack_receiver.cc @@ -256,6 +256,12 @@ void Ack_receiver::run() thd->security_ctx->skip_grants(); thd->set_command(COM_DAEMON); init_net(&net, net_buff, REPLY_MESSAGE_MAX_LENGTH); + /* + Don't generate error message in case of no data on socket. Will speed + up my_net_read() slightly in case of NET_READ_INTERRUPTED. + */ + net.no_errors_for_no_data= 1;
do you mean, it's for performance reasons?
Yes, that was the original intent. However, I have now removed this as I was able to find and fix the source of the problem. Thanks for the review! Regards, Monty