found occasional data loss in mysql. This time I lost a record in the order table. I used laravel
framework
generate order retention
user submit order-> Table 1 generate order-> user payment-> payment callback-> Table 1 status modification, insert the merchant"s collection record in Table 2 (get the order number from Table 1)
self-examination
1. The order table uses soft deletion, and the global search in the program does not find the statement to delete the order. Even if there is, soft deletion does not actually delete the data.
2. The records in Table 2 exist, indicating that the records in Table 1 still exist until the payment callback ends successfully. Moreover, the id is self-growing, and the middle 23 is followed by 25, except for * * 24, indicating that the record has been generated. It"s gone for no reason.
3. No one is operating the database at that point in time, so human erroneous deletion can be eliminated.