-
Notifications
You must be signed in to change notification settings - Fork 58
replication: add is_idempotent attr for task code; add allow_non_idem… #122
Conversation
…potent_write in replication option
@@ -162,11 +163,16 @@ class task_code | |||
// Notice we dispatch storage rpc's response to THREAD_POOL_DEFAULT, | |||
// the reason is that the storage rpc's response mainly runs at client side, which is not | |||
// necessary to start so many threadpools | |||
#define DEFINE_STORAGE_RPC_CODE(x, pri, pool, is_write, allow_batch) \ | |||
#define DEFINE_STORAGE_RPC_CODE(x, pri, pool, is_write, allow_batch, is_idempotent) \ |
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.
把上面的注释也跟着修改一下
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.
done
@@ -41,8 +41,8 @@ namespace replication { | |||
namespace application { | |||
|
|||
DEFINE_STORAGE_READ_RPC_CODE(RPC_SIMPLE_KV_SIMPLE_KV_READ) | |||
DEFINE_STORAGE_WRITE_RPC_CODE(RPC_SIMPLE_KV_SIMPLE_KV_WRITE, true) | |||
DEFINE_STORAGE_WRITE_RPC_CODE(RPC_SIMPLE_KV_SIMPLE_KV_APPEND, true) | |||
DEFINE_STORAGE_WRITE_RPC_CODE(RPC_SIMPLE_KV_SIMPLE_KV_WRITE, true, true) |
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.
要是能有个宏就完美了
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.
done
@@ -256,6 +257,11 @@ void replication_options::initialize() | |||
"empty_write_disabled", | |||
empty_write_disabled, | |||
"whether to disable empty write, default is false"); | |||
allow_non_idempotent_write = |
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.
这个option用tudo或者issue追踪一下,表示这是一个临时方案
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.
…potent_write in replication option