Affects Version/s: 10.0.0
Fix Version/s: 10.0.2
The original unmodified description of the problem can be found at the bottom of the field
On SQL thread start, a slave checks permissions for slave_load_tmpdir by creating (and immediately deleting) a dummy file there:
The resulting file is <slave_load_tmpdir>/SQL_LOAD-. If the file exists, slave fails to start. The draft test case below shows that, it fails for any version.
Usually it's not a problem, since the slave deletes the file immediately. However, with multiple slaves, if they on some reason restart simultaneously, I suppose it's possible to hit a race condition when one slave has created the file but not deleted it yet, and another slave attempts to create it too and fails.
Test case below shows how slave fails to start when the file exists
(it uses $MYSQLTEST_VARDIR/tmp because that's what MTR sets for slave_load_tmpdir):
Multi-source replication seems to randomly stop with
Last_SQL_Error: Unable to use slave's temporary directory /tmp - Can't create/write to file '/tmp/SQL_LOAD-' (Errcode: 17 "File exists")
Only see it occassionally on a huge replication volume (100s of GB/day).
Is the master name perhaps missing off the end of that file name?
Is there any data that would be useful to capture when this happens to help debugging?