-
Notifications
You must be signed in to change notification settings - Fork 322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: aggregator recovery #1622
Conversation
e.g.
we need to scan the binlog after 6. |
Codecov Report
@@ Coverage Diff @@
## main #1622 +/- ##
============================================
+ Coverage 67.82% 73.08% +5.25%
Complexity 323 323
============================================
Files 609 610 +1
Lines 118679 119206 +527
Branches 1000 1000
============================================
+ Hits 80491 87117 +6626
+ Misses 37981 31882 -6099
Partials 207 207
Continue to review full report at Codecov.
|
The reason why we are using binlog to do the recover of agg table, is the out of order issue which updates the already flushed results. Binlog cleaning makes it not easy to do it correct. As the deleted binlog may contains the data of the volatile AggrBuffer. Why not we do it in two steps:
|
1eb6630
to
5a19d4f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some minor comments
fix the cpplint
src/tablet/tablet_impl_test.cc
Outdated
@@ -181,7 +181,8 @@ void AddDefaultAggregatorBaseSchema(::openmldb::api::TableMeta* table_meta) { | |||
SchemaCodec::SetColumnDesc(table_meta->add_column_desc(), "col3", openmldb::type::DataType::kInt); | |||
SchemaCodec::SetColumnDesc(table_meta->add_column_desc(), "col4", openmldb::type::DataType::kDouble); | |||
|
|||
SchemaCodec::SetIndex(table_meta->add_column_key(), "idx", "id", "ts_col", ::openmldb::type::kAbsoluteTime, 0, 0); | |||
SchemaCodec::SetIndex(table_meta->add_column_key(), "idx1", "id", "ts_col", ::openmldb::type::kAbsoluteTime, 0, 0); | |||
SchemaCodec::SetIndex(table_meta->add_column_key(), "idx2", "col3", "ts_col", ::openmldb::type::kAbsoluteTime, 0, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cpplint
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
… into feat/aggregator_recovery
feature
close Support fault tolerance for pre-aggregation tables #1338
support aggregator recovery from tablet restart.
recovery binlog offset
starts from the minimize offset of all keys latest offset.DecodeAggrval
.AggrBuffer
.recover logic