In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "what are the relevant knowledge points of the MySQL log?" in the operation of the actual case, many people will encounter such a dilemma, and then let the editor lead you to learn how to deal with these situations! I hope you can read it carefully and be able to achieve something!
Write pos is the location of the current record, move back while writing, and then go back to the beginning of file 0 after writing to the end of document 3. Checkpoint is the current location to be erased, and it is also pushed back and looped, updating the record to the data file before erasing the record.
Between writepos and checkpoint is the empty part that can be used to record new operations. If write pos catches up with checkpoint, it means that it is full, and you can't perform any new updates at this time. You have to stop and erase some records and push checkpoint. With redo log,InnoDB, you can ensure that even if the database is restarted abnormally, the previously submitted records will not be lost. This capability is called crash-safe.
Archive log / binlog
Binlog records all logical operations and takes the form of "append write"
The difference from redo log
Redo log is specific to the InnoDB engine; binlog is implemented at the Server layer of MySQL and can be used by all engines.
Redo log is a physical log that records "what changes have been made on a data page"; binlog is a logical log that records the original logic of the statement, such as "add 1 to the c field of the ID=2 line."
Redo log is written in a loop, and the fixed space will be used up; binlog can be appended. "append write" means that when the binlog file is written to a certain size, it will switch to the next one and will not overwrite the previous log.
Two-phase submission
The actuator first goes to the engine to fetch the ID=2 line. ID is the primary key, and the engine uses a tree search to find this line. If the data page of the ID=2 line is already in memory, it is returned directly to the executor; otherwise, you need to read the memory from disk and then return it.
The executor takes the row data given by the engine, adds 1 to this value, for example, it was N, now it is Number1, gets a new row of data, and then calls the engine interface to write this new line of data.
The engine updates the new line of data to memory and records the update operation to redo log, when the redo log is in the prepare state. The executor is then informed that the execution is complete and the transaction can be committed at any time.
The executor generates the binlog for this operation and writes the binlog to disk.
The executor calls the commit transaction interface of the engine, and the engine changes the redo log just written to the commit (commit) state, and the update is completed.
This is the end of the content of "what are the relevant knowledge points of the MySQL log"? thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.