DBA problem-solving set: Learning data
Will you count? Many people may sneer at this problem, because when I was a child, my mom and dad taught us to count the stars and the sheep on the ground. Therefore, most people are the first to think: "Are you kidding me ?" It is precisely because of the simplicity of such pediatrics that we do not want to add our eyes and eyes, that we often fall into an embarrassing state in the support for routine changes, it brings negative comments to the player experience, company interests, and team impact.
After running a change script, DBA checks the logs to view the details of the change process. The most common change is grep-Ei error. log, what's more, Oracle DBA may switch to MySQL with the amazing behavior of grep-Ei ora. What about warnings? Can I ignore it? After we launched TokuDB in Tianya Mingyue Dao for about one to two months, one day our business O & M provided that the current network version was added with fields for a long time. This was in line with TokuDB's support for online field addition and passed the test again, it is found that MySQL 5.6 uses a new time type. If the earlier version contains a time field and is upgraded in the same place, the native online field of TokuDB cannot be used. We found this result through the warnings log. In fact, every DB version change also has this warnings, but we just turn a blind eye to it ".
Therefore, here I would like to put forward a point of view that we need to calculate the correct number for any change, not the wrong number.
So how can we achieve a number pair? That is, how can we count the number of pairs?
On the one hand, data content. In another example, after the database switch in Region 22 of fantasy world No. 12.24 was completed, gamer data was archived. Region 22 had migrated from region 26 to region 194, but the former DB 26 was not removed from the platform system, in this case, Slave in Region 22 mistakenly used the original DB 26 as the source master, resulting in less than a month of DB data after shard switching in Region 22. We should ensure that the change content is correct, from IP configuration, clone permissions to data synchronization and other basic links.
On the other hand, the number. For MySQL DBA, if there are 20 SQL statements, there must be 20 query OK results. For example, in the major region where the League of legends ruled that in October 20, after the stat DB switched to slave, players' records and combat power data were lost, the DBA checked whether the Slave status was normal through the DB toolbox of the platform; paste 16 stat slave IP addresses. The tool returns only 15 status results. DBA did not notice that the stat slave IP address of HN9 has not output results.
Have Fun!
By linwaterbin
In Shenzhen