Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

replication: add is_idempotent attr for task code; add allow_non_idem… #122

Merged
merged 2 commits into from
Jul 10, 2018

Conversation

qinzuoyan
Copy link
Member

…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) \
Copy link
Contributor

Choose a reason for hiding this comment

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

把上面的注释也跟着修改一下

Copy link
Member Author

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)
Copy link
Contributor

Choose a reason for hiding this comment

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

要是能有个宏就完美了

Copy link
Member Author

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 =
Copy link
Contributor

Choose a reason for hiding this comment

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

这个option用tudo或者issue追踪一下,表示这是一个临时方案

Copy link
Member Author

Choose a reason for hiding this comment

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

@qinzuoyan qinzuoyan merged commit 8f0ff15 into master Jul 10, 2018
@qinzuoyan qinzuoyan deleted the qinzuoyan1 branch July 10, 2018 02:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants