-
Notifications
You must be signed in to change notification settings - Fork 58
feat(update_replication_factor#3): support to set the replication factor for all partitions of each table #1077
feat(update_replication_factor#3): support to set the replication factor for all partitions of each table #1077
Conversation
…tor for all partitions of each table
…tor for all partitions of each table
…tor for all partitions of each table
…tor for all partitions of each table
…tor for all partitions of each table
src/meta/server_state.cpp
Outdated
|
||
auto app = get_app_and_check_exist(app_name, response); | ||
if (app == nullptr) { | ||
response.hint_message += |
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.
no need +=
src/meta/server_state.cpp
Outdated
|
||
const auto app_id = app->app_id; | ||
|
||
dassert_f(app->is_stateful, |
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.
if not main business logic
, such as read/write
, not suggest execute dassert, which will cause unnecessary downtime of the cluster. You just need to return error to disable this operation
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.
if not
main business logic
, such asread/write
, not suggest execute dassert, which will cause unnecessary downtime of the cluster. You just need to return error to disable this operation
Actually dassert(app->is_stateful)
is put here according to existing code, such as
L1860, server_state::on_update_configuration
. I think this assertion is just for the stateful table, is it ? On the other hand, it seems that for now there's no stateless table ?
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.
Yeah, there's no stateless table. Butserver_state::on_update_configuration
is main logic
, it must make sure current state is correct, so it dassert
is acceptable. This added feature is not necessary for either successful or coredump
, just return error log message is ok.
I find you use many |
I think it is strange to define two functions called
Besides, I notice that #1072 support update app's max_replica_count, and in this pr, if partition update max_replica_count failed, app's value should be revert. I suggest that you can update the code like:
|
…tor for all partitions of each table
…tor for all partitions of each table
…tor for all partitions of each table
…tor for all partitions of each table
…tor for all partitions of each table (#1077)
…tor for all partitions of each table (#1077)
apache/incubator-pegasus#865