[MDEV-14616] WSREP has not yet prepared node for application use error Created: 2017-12-11  Updated: 2018-05-29  Resolved: 2018-04-03

Status: Closed
Project: MariaDB Server
Component/s: Galera, Tests
Affects Version/s: 10.1, 10.2, 10.3
Fix Version/s: 10.1.33, 10.2.14, 10.3.6

Type: Bug Priority: Major
Reporter: Jan Lindström (Inactive) Assignee: Jan Lindström (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Blocks
blocks MDEV-15301 Merge 25.3.23 from mysql-wsrep to 10.1 Closed

 Description   

Contains following Galera fixes:

  • MW-405 Make sure wsrep is ready in wait_until_connected_again.inc
    • wait_until_connected_again issues 'SHOW STATUS' query repeatedlyuntil mysqld replies without errors. However, SHOW STATUS is treated specially by wsrep in that it is allowed to proceed even if wsrep is not yet in ready state. As a consequence, after returning from wait_until_connected_again, wsrep may not be ready yet and subsequent queries may fail with error "1047 WSREP has not yet prepared node for application use". To avoid those errors, the patch includes wait_wsrep_ready.inc at the end of the wait_until_connected_again.inc
    • kill_galera.inc can no longer rely on wait_until_connected_again.inc. This is because wait_until_connected_again now tries to make sure that the server it is connected eventually transition to ready state. Whereas some tests may need to kill galera while the server is in a non-primary view.
  • MW-408 Fix 'WSREP error while trying to determine node state'
    • mysql-test-run.pl sporadically reports 'WSREP error while trying to determine node state' right after starting servers for test execution. This happens because we try to execute a SELECT statement that queries the current value of status variable wsrep_ready. If this statement fails, the above message is reported. The failure is due to fact that wsrep may return error ER_LOCK_WAIT_TIMEOUT (on any SELECT statement) if it is not ready and wsrep_sync_wait enabled for SELECTs. The fix is to disable wsrep_sync_wait for the session that issues those SELECT statements.


 Comments   
Comment by Jan Lindström (Inactive) [ 2017-12-11 ]

https://github.com/MariaDB/server/commit/de43b0ef6af04e672a1f2cb72e0fa4ad32d43e33

Branch: bb-10.0-galera

Comment by Jan Lindström (Inactive) [ 2017-12-11 ]

Latest known failure in galera.wan like

galera.galera_wan 'xtradb'               w4 [ fail ]
        Test ended at 2017-12-09 07:51:24
 
CURRENT_TEST: galera.galera_wan
 
 
Could not execute 'check-testcase' before testcase 'galera.galera_wan' (res: 1):
mysqltest: Logging to '/dev/shm/var/4/tmp/check-mysqld_3.log'.
mysqltest: Results saved in '/dev/shm/var/4/tmp/check-mysqld_3.result'.
mysqltest: Connecting to server localhost:16062 (socket /dev/shm/var/tmp/4/mysqld.3.sock) as 'root', connection 'default', attempt 0 ...
mysqltest: ... Connected.
mysqltest: Start processing test commands from './include/check-testcase.test' ...
mysqltest: At line 78: query 'call mtr.check_testcase()' failed: 1047: WSREP has not yet prepared node for application use
not ok
mysqltest failed but provided no output

See http://buildbot.askmonty.org/buildbot/builders/kvm-deb-jessie-x86/builds/3375/steps/mtr/logs/stdio

Comment by Elena Stepanova [ 2018-01-02 ]

serg,

I've added some notes to the patch, and am now assigning it to you as discussed. If you don't want to look at it until the notes are addressed, please just give it straight back to jplindst.

Comment by Jan Lindström (Inactive) [ 2018-02-14 ]

https://github.com/MariaDB/server/commit/4dfd2a9adbf26b12c828ec2616a36ae1fd8d3e69

Generated at Thu Feb 08 08:14:57 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.