1. Read the unprocessed data
2. The tag starts processing
3. Start processing
4. The update process the results
That way. If there is an error in step 3 processing, led to the suspension of the program or exit, etc. There is no complete step 4.
So can you tell me the procedure how to restore after restart for which data to process?
I can think of is:
1. Write a local file to play tag
2. Use the time to do mark, such as start dealing with the data to the current time stamp (+ 300 seconds timeout
3. Create a new temporary table records in the db
The above parties, 1 and 3 is dig a pit to solve a problem.
2 look ok, but in the face of a data table one day, there is a problem, too.
To ask, is there a better way to solve this problem, thank you
CodePudding user response:
Using the database itself provides transaction, not enough use?