A good memory is better than a bad pen. 26-java Handling file transactions (4)

Source: Internet
Author: User


The transaction processing system is very familiar to the database users, but if the transaction processing system is transferred from the database to the file system, it is estimated that many students will be helpless. In fact, support for file system operations transactions has been weak, regardless of library/framework, language, or file system level.

See some file system operations alone (such as file renaming, deletion, etc.), they are atomic, but from the current situation, there are few solutions to form a comprehensive set of APIs, all-round support for transactional file IO operations. If file operations (such as creating, modifying, renaming, deleting files) need to be executed consistently as part of a transaction, the application often has to rely on a self-designed scenario to reduce the likelihood of a system/application failure or inconsistent state when concurrent access occurs.

There is no particularly good way to manage the transactional management of file systems, although Apache also offers some methods, but in practice it is not very convenient and effective.

APACHE provide the file thing system,

please refer to the blog:http://blog.csdn.net/ffm83/article/details/42235771

In many of the daily work, encountered this problem, is to take the first backup, and then modify the way to deal with, the big deal use multiple copies, or use pessimistic lock, or use optimistic lock, and then combined with the business form of targeted processing.

A good memory is better than a bad pen. 26-java Handling file transactions (4)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.