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

split: meta start partition split #286

Merged
merged 11 commits into from
Aug 6, 2019
25 changes: 22 additions & 3 deletions include/dsn/cpp/json_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@
#define JSON_ENCODE_ENTRIES11(out, prefix, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) \
JSON_ENCODE_ENTRIES10(out, prefix, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10); \
JSON_ENCODE_ENTRY(out, prefix, T11)
#define JSON_ENCODE_ENTRIES12(out, prefix, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) \
JSON_ENCODE_ENTRIES11(out, prefix, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11); \
JSON_ENCODE_ENTRY(out, prefix, T12)
#define JSON_ENCODE_ENTRIES13(out, prefix, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) \
JSON_ENCODE_ENTRIES12(out, prefix, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12); \
JSON_ENCODE_ENTRY(out, prefix, T13)

#define JSON_DECODE_ENTRY(in, prefix, T) \
do { \
Expand Down Expand Up @@ -128,15 +134,24 @@
#define JSON_DECODE_ENTRIES11(in, prefix, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) \
JSON_DECODE_ENTRIES10(in, prefix, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10); \
JSON_TRY_DECODE_ENTRY(in, prefix, T11)

#define JSON_ENTRIES_GET_MACRO(ph1, ph2, ph3, ph4, ph5, ph6, ph7, ph8, ph9, ph10, ph11, NAME, ...) \
#define JSON_DECODE_ENTRIES12(in, prefix, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) \
JSON_DECODE_ENTRIES11(in, prefix, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11); \
JSON_TRY_DECODE_ENTRY(in, prefix, T12)
#define JSON_DECODE_ENTRIES13(in, prefix, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) \
JSON_DECODE_ENTRIES12(in, prefix, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12); \
JSON_TRY_DECODE_ENTRY(in, prefix, T13)

#define JSON_ENTRIES_GET_MACRO( \
ph1, ph2, ph3, ph4, ph5, ph6, ph7, ph8, ph9, ph10, ph11, ph12, ph13, NAME, ...) \
NAME
// workaround due to the way VC handles "..."
#define JSON_ENTRIES_GET_MACRO_(tuple) JSON_ENTRIES_GET_MACRO tuple

#define JSON_ENCODE_ENTRIES(out, prefix, ...) \
out.StartObject(); \
JSON_ENTRIES_GET_MACRO_((__VA_ARGS__, \
JSON_ENCODE_ENTRIES13, \
JSON_ENCODE_ENTRIES12, \
JSON_ENCODE_ENTRIES11, \
JSON_ENCODE_ENTRIES10, \
JSON_ENCODE_ENTRIES9, \
Expand All @@ -156,6 +171,8 @@
int arguments_count = 0; \
int parsed_count = 0; \
JSON_ENTRIES_GET_MACRO_((__VA_ARGS__, \
JSON_DECODE_ENTRIES13, \
JSON_DECODE_ENTRIES12, \
JSON_DECODE_ENTRIES11, \
JSON_DECODE_ENTRIES10, \
JSON_DECODE_ENTRIES9, \
Expand Down Expand Up @@ -601,6 +618,8 @@ NON_MEMBER_JSON_SERIALIZATION(dsn::app_info,
max_replica_count,
expire_second,
create_second,
drop_second)
drop_second,
duplicating,
init_partition_count)
} // namespace json
} // namespace dsn
12 changes: 10 additions & 2 deletions include/dsn/cpp/serialization_helper/dsn.layer2_types.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions include/dsn/dist/replication/replication.codes.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ MAKE_EVENT_CODE_RPC(RPC_CM_QUERY_DUPLICATION, TASK_PRIORITY_COMMON)
MAKE_EVENT_CODE_RPC(RPC_CM_DUPLICATION_SYNC, TASK_PRIORITY_COMMON)
MAKE_EVENT_CODE_RPC(RPC_CM_UPDATE_APP_ENV, TASK_PRIORITY_COMMON)
MAKE_EVENT_CODE_RPC(RPC_CM_DDD_DIAGNOSE, TASK_PRIORITY_COMMON)
MAKE_EVENT_CODE_RPC(RPC_CM_APP_PARTITION_SPLIT, TASK_PRIORITY_COMMON)
#undef CURRENT_THREAD_POOL

#define CURRENT_THREAD_POOL THREAD_POOL_META_STATE
Expand Down
114 changes: 114 additions & 0 deletions include/dsn/dist/replication/replication_types.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions src/core/core/dsn.layer2_types.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading