Uh oh!
There was an error while loading. Please reload this page.
Add delayed deletion of rowsets function, fix -230 error. - #4039
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| _rs_graph.construct_rowset_graph(_tablet_meta->all_rs_metas()); | ||
| // change _rs_graph to _versioned_rs_tracker | ||
| // _rs_graph.construct_rowset_graph(_tablet_meta->all_rs_metas()); | ||
| _versioned_rs_tracker.construct_versioned_tracker(_tablet_meta->all_rs_metas(), |
Uh oh!
There was an error while loading. Please reload this page.
0f8d14d to
5eb43d3CompareUh oh!
There was an error while loading. Please reload this page.
| RETURN_NOT_OK(gc_unused_rowsets()); | ||
| TRACE("unused rowsets have been moved to GC queue"); | ||
| // RETURN_NOT_OK(gc_unused_rowsets()); | ||
| // TRACE("unused rowsets have been moved to GC queue"); |
| } | ||
| void RowsetGraph::construct_rowset_graph(const std::vector<RowsetMetaSharedPtr>& rs_metas, | ||
| int64_t& max_version) { |
There was a problem hiding this comment.
| int64_t& max_version) { | |
| int64_t* max_version) { |
Better to use point to indicate it is a output parameter.
| /// RowsetGraph class which is implemented to build and maintain total versions of rowsets. | ||
| /// This class use adjacency-matrix represent rowsets version and links. A vertex is a version | ||
| /// and a link is the _version object of a rowset (from start version to end version). |
There was a problem hiding this comment.
| /// and a link is the _version object of a rowset (from start version to end version). | |
| /// and a link is the _version object of a rowset (from start version to end version + 1). |
| }; | ||
| } // namespace doris | ||
| /// VersionTracker class which is implemented to maintain compacted version path of rowsets. |
There was a problem hiding this comment.
| /// VersionTracker class which is implemented to maintain compacted version path of rowsets. | |
| /// VersionTracker class which is implemented to maintain multi-version path of rowsets. |
| /// VersionedRowsetTracker class is responsible to track all rowsets version links of a tablet. | ||
| /// This class not only records the graph of all versions, but also records the paths which will be removed | ||
| /// after the path is expired. | ||
| class VersionedRowsetTracker { |
There was a problem hiding this comment.
| classVersionedRowsetTracker { | |
| classTimestampedVersionTracker { |
| // 2 remove this path from other_path | ||
| auto path_iter = path_version_ptr->begin(); | ||
| for (; path_iter != path_version_ptr->end(); path_iter++) { | ||
| Version version = (*path_iter)->version(); |
There was a problem hiding this comment.
| Version version = (*path_iter)->version(); | |
| constVersion& version = (*path_iter)->version(); |
| _construct_versioned_tracker(rs_metas, expired_snapshot_rs_metas); | ||
| } | ||
| void VersionedRowsetTracker::reconstruct_versioned_tracker( |
There was a problem hiding this comment.
Looks same as construct_versioned_tracker()
| while (iter != _expired_snapshot_rs_path_map.end()) { | ||
| std::vector<VersionTrackerSharedPtr>::iterator version_path_iter = iter->second->begin(); | ||
| int64_t max_create_time = -1; |
There was a problem hiding this comment.
I think we can save the max_create_time of a version path in _expired_snapshot_rs_path_map
| } | ||
| } | ||
| void VersionedRowsetTracker::_print_current_state() { |
There was a problem hiding this comment.
Better to return a string, and let the caller decide how to print it.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
3ed0620 to
64713d0Compare
Related issue #4017, main changes as follows: