How does the user code perceive the current master and slave of the cluster after the master-slave switch of the redis sentinel cluster?

how does the user code perceive which instance of the current master is after the master-slave switch of the redis sentinel cluster? Thus write to the current main library.
Thank you for your guidance ~

Feb.28,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea4929-47abc.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea4929-47abc.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?