• Easily complete a distributed transaction TCC, nanny level tutorial with PHP


    What is TCC? TCC is the abbreviation of try, confirm and cancel. It was first proposed by a paper entitled life beyond distributed transactions: an apostate’s opinion published by Pat helland in 2007. TCC composition TCC is divided into three stages Try phase: try to execute, complete all business checks (consistency), and reserve necessary business […]

  • Introduction to database transactions


    1、 Transaction classification Transaction is a program execution unit that accesses and updates various data items in the database. Transaction will convert the database from one consistent state to another consistent state. This is the purpose of transaction and one of the important characteristics that distinguish the transaction model from the file system. Transactions in […]

  • Comparison of common technologies and schemes of database recovery subsystem (I)


    Author: Xiao Chen / big data open laboratory For transactional database, the key function is to ensure the acid attribute of things, in which atomicity and persistence depend on the recovery subsystem. If it is found that the transaction cannot continue during the transaction, it needs to be rolled back with the recovery subsystem; Or […]

  • Detailed explanation of database transaction


    1、 Business 1. What is a transaction A transaction consists of one or moreSQLThe logical execution unit composed of statements can be compared to a container, which contains a pile ofSQLStatements, either all of which are executed successfully or none of which can be executed successfully(Atomicity) 2. Why use transactions When performing a series of […]

  • Comparison of common technologies and schemes of database recovery subsystem (2)


    Author: Xiao Chen / big data open laboratory Last article《Comparison of common technologies and schemes of database recovery subsystem (I)》In, we basically introduce the logging & recovery recovery subsystem in the database management system, and discuss in detail the concept and technical implementation of Aries, the mainstream recovery algorithm based on physical logging. This article […]

  • Read the optimistic lock, pessimistic lock and mvcc in the database


    preface In the actual use of the database, we often encounter situations where we don’t want the data to be written or read at the same time. For example, in the second kill scenario, two requests read that there is still one inventory in the system at the same time, and then update the inventory […]

  • MySQL basics summary


    Field type The difference between int (5) and int (10) Clickable blogProgram ape grocery storeint(5)  Andint(11)The characters in the parentheses after represent the display width. The display width of the integer column has nothing to do with the number of characters MySQL needs to display the value of the column, and has nothing to do […]

  • “MySQL” mybatis query result is inconsistent with MySQL execution result?


    1. Broken thoughts Recently, I encountered a problem in the business. The business is as follows: when inserting a new user, it is necessary to verify whether some information of the user is unique, and the verification result is always not unique in the program. Then I took out the SQL statement printed by mybatis […]

  • 🍖 MySQL lock mechanism


    introduce 1. What is a lock Lock is a mechanism by which a computer coordinates multiple processes or threads to access a resource concurrently. We call it lock mechanism 2. Why use the lock mechanism Because in the database, in addition to the contention of traditional computing resources (such as CPU, ram, I / O, […]

  • Summer self-study day 14 | database (VII) – affairs


    Series articles: Summer self-study day 09 | database (I) – SQL, DDL Summer self-study day 10 | database (II) – DML Summer self-study day 10 | database (III) – DQL Summer self-study day 11 | database (IV) – constraints Summer self-study day 12 | database (V) – multi table, database design Summer self-study day 13 […]

  • 🍖 Transaction isolation mechanism


    1、 Introduction to transaction isolation mechanism Transaction hasAtomicity, consistency, isolation, persistenceFour characteristics andIsolationAs the name suggests, transactions are isolated from each other. When multiple transactions process a data at the same time, they do not affect each other. If the isolation is not good enough, there may be problemsDirty reading, unrepeatable reading, phantom reading, etcphenomenon […]

  • Deep analysis of distributed transaction performance


    With the large-scale application of microservices, there are more and more distributed transactions across microservices. What is the performance of distributed transactions? How much performance will be reduced? Can it meet business needs? These indicators are very concerned about whether distributed transactions can be successfully introduced into production applications. This paper attempts to deeply analyze […]