apply() is first submitted to the memory (it has atomicity and cannot be interrupted), and then submitted to the database asynchronously, with no return value, and it is impossible to know whether the submission is successful or not, which is more efficient
commit() is directly submitted to the database (with atomicity), with a return value indicating whether the submission was successful or not
Details: https://www.jianshu.com/p/c8d10357c939