-
Notifications
You must be signed in to change notification settings - Fork 312
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(split): add partition_version #474
Conversation
@@ -340,6 +342,8 @@ class pegasus_server_impl : public ::dsn::apps::rrdb_service | |||
|
|||
pegasus_manual_compact_service _manual_compact_svc; | |||
|
|||
std::atomic<int32_t> _partition_version; |
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.
放到基类replication_app_base里面是不是更合理?毕竟pegasus_server_impl不应该知道partition这个概念
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.
pegasus_server_impl
也需要partition_version
这个变量,split会让parent拥有child的数据,child也拥有parent的数据,在split完成之后这些无效数据应该要被删除,partition_version
就被用于这个无效数据的清理,后续pr会交这部分的代码
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.
现在还看不出来她的必要性,后面的pr我再看吧
What problem does this PR solve?
Add definition of
partition_version
, used for partition split to guarantee data consistency.What is changed and how it works?
Check List
Tests
Related changes