Skip to content

Conversation

@gaodayue
Copy link
Contributor

@gaodayue gaodayue commented Sep 3, 2019

The PR contains the following changes

  • a factory method create_rowset_writer is added to RowsetFactory. All clients of RowsetWriter have been rewritten to use the factory method to obtain RowsetWriter instance.
  • a global constant DEFAULT_ROWSET_TYPE is added to represent the default rowset type for newly generated rowset. Currently it's set ALPHA_ROWSET, but can be changed to BETA_ROWSET when V2 segment is ready to be released as the default type.
  • Merger is refactored to provides simpler interface to its clients
  • There is no reason to use shared ownership for RowsetWriter. As a result, RowsetWriterSharedPtr is removed and all clients are switched to unique_ptr.
  • RowsetIdGenerator.next_id() is refactored to return RowsetId instead of OLAPStatus since the operation can't fail. It makes the client code much more cleaner.
  • a new macro RETURN_NOT_OK_LOG is added to oneliner the common if-error-then-warn-and-return pattern.

Copy link
Contributor

@imay imay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@imay imay merged commit a63989c into apache:master Sep 4, 2019
@gaodayue gaodayue deleted the rowset_writer_factory branch September 5, 2019 02:54
swjtu-zhanglei pushed a commit to swjtu-zhanglei/incubator-doris that referenced this pull request Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants