Guocheng Zhang created TUBEMQ-40:
------------------------------------
Summary: Optimize message disk store classes's logic
Key: TUBEMQ-40
URL: https://issues.apache.org/jira/browse/TUBEMQ-40
Project: Apache TubeMQ
Issue Type: Improvement
Reporter: Guocheng Zhang
Fix For: 0.3.0
Recently, in actual testing and troubleshooting, we analyzed and organized the
logic of file storage (org.apache.tubemq.server.broker.msgstore.disk), and
found some problems that need to be optimized:
1. Because the data uses an out-of-date aging mechanism, the FileSegment file
indexing method is not necessary,and this logic interferes will with the use of
the system;
2. The FileReadView class is intended to construct a separate view of the read
data processing, and at the same time control the read operation in the view.
From the actual troubleshooting, this logic is not necessary, and no requests
will read expired files, the class for read encapsulation is not needed;
3. The FileSegmentList class, from the test point of view, the use of List is
not as good as the array method, and not faster, at the same time, this class
is best to form a container without too much other business logic, so that the
abstraction will be more suitable for its positioning.
I'll append my changes to improve them.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)