Skip to content
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

Rft rm dsn ns #77

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
src/.matchfile
src/base/rrdb_types.cpp
src/include/rrdb/rrdb_types.h
src/common/serialization_helper/dsn.layer2_types.h
src/runtime/dsn.layer2_types.cpp
src/common/serialization_helper/pegasus.layer2_types.h
src/runtime/pegasus.layer2_types.cpp

onebox/
.zk_install/
Expand Down
8 changes: 4 additions & 4 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ header:
- 'cmake_modules/BaseFunctions.cmake'
- 'docs/rdsn-README.md'
- 'idl/command.thrift'
- 'idl/dsn.layer2.thrift'
- 'idl/dsn.thrift'
- 'idl/metadata.thrift'
- 'idl/meta_admin.thrift'
- 'idl/pegasus.layer2.thrift'
- 'idl/pegasus.thrift'
- 'idl/replica_admin.thrift'
- 'scripts/compile_thrift.py'
- 'scripts/learn_stat.py'
Expand All @@ -112,8 +112,8 @@ header:
- 'src/common/json_helper.h'
- 'src/runtime/rpc/rpc_stream.h'
- 'src/runtime/rpc/serialization.h'
- 'src/common/serialization_helper/dsn.layer2_types.h'
- 'src/common/serialization_helper/dsn_types.h'
- 'src/common/serialization_helper/pegasus.layer2_types.h'
- 'src/common/serialization_helper/thrift_helper.h'
- 'src/runtime/serverlet.h'
- 'src/runtime/service_app.h'
Expand Down Expand Up @@ -513,13 +513,13 @@ header:
- 'src/replica/test/run.sh'
- 'src/runtime/CMakeLists.txt'
- 'src/runtime/core_main.cpp'
- 'src/runtime/dsn.layer2_types.cpp'
- 'src/runtime/env.sim.cpp'
- 'src/runtime/env.sim.h'
- 'src/runtime/fault_injector.cpp'
- 'src/runtime/global_config.cpp'
- 'src/runtime/message_utils.cpp'
- 'src/runtime/nativerun.cpp'
- 'src/runtime/pegasus.layer2_types.cpp'
- 'src/runtime/profiler.cpp'
- 'src/runtime/profiler_header.h'
- 'src/runtime/providers.common.cpp'
Expand Down
2 changes: 1 addition & 1 deletion go-client/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
build:
thrift -I ../idl -out idl --gen go:thrift_import='github.com/apache/thrift/lib/go/thrift',package_prefix='github.com/apache/incubator-pegasus/go-client/idl/' ../idl/backup.thrift
thrift -I ../idl -out idl --gen go:thrift_import='github.com/apache/thrift/lib/go/thrift',package_prefix='github.com/apache/incubator-pegasus/go-client/idl/' ../idl/bulk_load.thrift
thrift -I ../idl -out idl --gen go:thrift_import='github.com/apache/thrift/lib/go/thrift',package_prefix='github.com/apache/incubator-pegasus/go-client/idl/' ../idl/dsn.layer2.thrift
thrift -I ../idl -out idl --gen go:thrift_import='github.com/apache/thrift/lib/go/thrift',package_prefix='github.com/apache/incubator-pegasus/go-client/idl/' ../idl/pegasus.layer2.thrift
thrift -I ../idl -out idl --gen go:thrift_import='github.com/apache/thrift/lib/go/thrift',package_prefix='github.com/apache/incubator-pegasus/go-client/idl/' ../idl/duplication.thrift
thrift -I ../idl -out idl --gen go:thrift_import='github.com/apache/thrift/lib/go/thrift',package_prefix='github.com/apache/incubator-pegasus/go-client/idl/' ../idl/meta_admin.thrift
thrift -I ../idl -out idl --gen go:thrift_import='github.com/apache/thrift/lib/go/thrift',package_prefix='github.com/apache/incubator-pegasus/go-client/idl/' ../idl/metadata.thrift
Expand Down
4 changes: 2 additions & 2 deletions go-client/docs/how_to_add_new_interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ you can follow [the building manual of thrift](https://thrift.apache.org/docs/Bu
```sh
thrift -I ../idl -out idl --gen go:thrift_import='github.com/apache/thrift/lib/go/thrift',package_prefix='github.com/apache/incubator-pegasus/idl/' ../idl/backup.thrift
thrift -I ../idl -out idl --gen go:thrift_import='github.com/apache/thrift/lib/go/thrift',package_prefix='github.com/apache/incubator-pegasus/idl/' ../idl/bulk_load.thrift
thrift -I ../idl -out idl --gen go:thrift_import='github.com/apache/thrift/lib/go/thrift',package_prefix='github.com/apache/incubator-pegasus/idl/' ../idl/dsn.layer2.thrift
thrift -I ../idl -out idl --gen go:thrift_import='github.com/apache/thrift/lib/go/thrift',package_prefix='github.com/apache/incubator-pegasus/idl/' ../idl/dsn.thrift
thrift -I ../idl -out idl --gen go:thrift_import='github.com/apache/thrift/lib/go/thrift',package_prefix='github.com/apache/incubator-pegasus/idl/' ../idl/pegasus.layer2.thrift
thrift -I ../idl -out idl --gen go:thrift_import='github.com/apache/thrift/lib/go/thrift',package_prefix='github.com/apache/incubator-pegasus/idl/' ../idl/pegasus.thrift
thrift -I ../idl -out idl --gen go:thrift_import='github.com/apache/thrift/lib/go/thrift',package_prefix='github.com/apache/incubator-pegasus/idl/' ../idl/duplication.thrift
thrift -I ../idl -out idl --gen go:thrift_import='github.com/apache/thrift/lib/go/thrift',package_prefix='github.com/apache/incubator-pegasus/idl/' ../idl/meta_admin.thrift
thrift -I ../idl -out idl --gen go:thrift_import='github.com/apache/thrift/lib/go/thrift',package_prefix='github.com/apache/incubator-pegasus/idl/' ../idl/metadata.thrift
Expand Down
52 changes: 26 additions & 26 deletions idl/backup.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
// specific language governing permissions and limitations
// under the License.

include "dsn.thrift"
include "dsn.layer2.thrift"
include "pegasus.thrift"
include "pegasus.layer2.thrift"

namespace cpp dsn.replication
namespace cpp pegasus.replication
namespace go admin
namespace java org.apache.pegasus.replication

Expand All @@ -44,7 +44,7 @@ struct configuration_restore_request

struct backup_request
{
1:dsn.gpid pid;
1:pegasus.gpid pid;
2:policy_info policy;
3:string app_name;
4:i64 backup_id;
Expand All @@ -54,18 +54,18 @@ struct backup_request

struct backup_response
{
1:dsn.error_code err;
2:dsn.gpid pid;
3:i32 progress; // the progress of the cold_backup
4:string policy_name;
5:i64 backup_id;
6:i64 checkpoint_total_size;
1:pegasus.error_code err;
2:pegasus.gpid pid;
3:i32 progress; // the progress of the cold_backup
4:string policy_name;
5:i64 backup_id;
6:i64 checkpoint_total_size;
}

// clear all backup resources (including backup contexts and checkpoint dirs) of this policy.
struct backup_clear_request
{
1:dsn.gpid pid;
1:pegasus.gpid pid;
2:string policy_name;
}

Expand All @@ -82,7 +82,7 @@ struct configuration_modify_backup_policy_request

struct configuration_modify_backup_policy_response
{
1:dsn.error_code err;
1:pegasus.error_code err;
2:string hint_message;
}

Expand All @@ -98,7 +98,7 @@ struct configuration_add_backup_policy_request

struct configuration_add_backup_policy_response
{
1:dsn.error_code err;
1:pegasus.error_code err;
2:string hint_message;
}

Expand Down Expand Up @@ -129,23 +129,23 @@ struct configuration_query_backup_policy_request

struct configuration_query_backup_policy_response
{
1:dsn.error_code err;
1:pegasus.error_code err;
2:list<policy_entry> policys;
3:list<list<backup_entry>> backup_infos;
4:optional string hint_msg;
}

struct configuration_report_restore_status_request
{
1:dsn.gpid pid;
2:dsn.error_code restore_status;
3:i32 progress; //[0~1000]
4:optional string reason;
1:pegasus.gpid pid;
2:pegasus.error_code restore_status;
3:i32 progress; //[0~1000]
4:optional string reason;
}

struct configuration_report_restore_status_response
{
1:dsn.error_code err;
1:pegasus.error_code err;
}

struct configuration_query_restore_request
Expand All @@ -155,9 +155,9 @@ struct configuration_query_restore_request

struct configuration_query_restore_response
{
1:dsn.error_code err;
2:list<dsn.error_code> restore_status;
3:list<i32> restore_progress;
1:pegasus.error_code err;
2:list<pegasus.error_code> restore_status;
3:list<i32> restore_progress;
}

struct start_backup_app_request
Expand All @@ -174,9 +174,9 @@ struct start_backup_app_response
// - ERR_INVALID_STATE: app is not available or is backing up
// - ERR_INVALID_PARAMETERS: backup provider type is invalid
// - ERR_SERVICE_NOT_ACTIVE: meta doesn't enable backup service
1:dsn.error_code err;
2:string hint_message;
3:optional i64 backup_id;
1:pegasus.error_code err;
2:string hint_message;
3:optional i64 backup_id;
}

struct backup_item
Expand All @@ -202,7 +202,7 @@ struct query_backup_status_response
// Possible error:
// - ERR_INVALID_PARAMETERS: no available backup for requested app
// - ERR_SERVICE_NOT_ACTIVE: meta doesn't enable backup service
1:dsn.error_code err;
1:pegasus.error_code err;
2:string hint_message;
3:optional list<backup_item> backup_items;
}
102 changes: 51 additions & 51 deletions idl/bulk_load.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
// specific language governing permissions and limitations
// under the License.

include "dsn.thrift"
include "dsn.layer2.thrift"
include "pegasus.thrift"
include "pegasus.layer2.thrift"
include "metadata.thrift"

namespace cpp dsn.replication
namespace cpp pegasus.replication
namespace go admin
namespace java org.apache.pegasus.replication

Expand Down Expand Up @@ -73,31 +73,31 @@ struct start_bulk_load_response
// - ERR_OBJECT_NOT_FOUND: bulk_load_info not exist on file_provider
// - ERR_CORRUPTION: bulk_load_info is damaged on file_provider
// - ERR_INCONSISTENT_STATE: app_id or partition_count inconsistent
1:dsn.error_code err;
2:string hint_msg;
1:pegasus.error_code err;
2:string hint_msg;
}

struct partition_bulk_load_state
{
1:optional i32 download_progress = 0;
2:optional dsn.error_code download_status;
3:optional ingestion_status ingest_status = ingestion_status.IS_INVALID;
4:optional bool is_cleaned_up = false;
5:optional bool is_paused = false;
1:optional i32 download_progress = 0;
2:optional pegasus.error_code download_status;
3:optional ingestion_status ingest_status = ingestion_status.IS_INVALID;
4:optional bool is_cleaned_up = false;
5:optional bool is_paused = false;
}

// meta server -> replica server
struct bulk_load_request
{
1:dsn.gpid pid;
2:string app_name;
3:dsn.rpc_address primary_addr;
4:string remote_provider_name;
5:string cluster_name;
6:i64 ballot;
7:bulk_load_status meta_bulk_load_status;
8:bool query_bulk_load_metadata;
9:string remote_root_path;
1:pegasus.gpid pid;
2:string app_name;
3:pegasus.rpc_address primary_addr;
4:string remote_provider_name;
5:string cluster_name;
6:i64 ballot;
7:bulk_load_status meta_bulk_load_status;
8:bool query_bulk_load_metadata;
9:string remote_root_path;
}

struct bulk_load_response
Expand All @@ -109,28 +109,28 @@ struct bulk_load_response
// - ERR_FILE_OPERATION_FAILED: local file system error during bulk load downloading
// - ERR_FS_INTERNAL: remote file provider error during bulk load downloading
// - ERR_CORRUPTION: metadata corruption during bulk load downloading
1:dsn.error_code err;
2:dsn.gpid pid;
3:string app_name;
4:bulk_load_status primary_bulk_load_status;
5:map<dsn.rpc_address, partition_bulk_load_state> group_bulk_load_state;
6:optional bulk_load_metadata metadata;
7:optional i32 total_download_progress;
8:optional bool is_group_ingestion_finished;
9:optional bool is_group_bulk_load_context_cleaned_up;
10:optional bool is_group_bulk_load_paused;
1:pegasus.error_code err;
2:pegasus.gpid pid;
3:string app_name;
4:bulk_load_status primary_bulk_load_status;
5:map<pegasus.rpc_address, partition_bulk_load_state> group_bulk_load_state;
6:optional bulk_load_metadata metadata;
7:optional i32 total_download_progress;
8:optional bool is_group_ingestion_finished;
9:optional bool is_group_bulk_load_context_cleaned_up;
10:optional bool is_group_bulk_load_paused;
}

// primary -> secondary
struct group_bulk_load_request
{
1:string app_name;
2:dsn.rpc_address target_address;
3:metadata.replica_configuration config;
4:string provider_name;
5:string cluster_name;
6:bulk_load_status meta_bulk_load_status;
7:string remote_root_path;
1:string app_name;
2:pegasus.rpc_address target_address;
3:metadata.replica_configuration config;
4:string provider_name;
5:string cluster_name;
6:bulk_load_status meta_bulk_load_status;
7:string remote_root_path;
}

struct group_bulk_load_response
Expand All @@ -143,7 +143,7 @@ struct group_bulk_load_response
// - ERR_FILE_OPERATION_FAILED: local file system error during bulk load downloading
// - ERR_FS_INTERNAL: remote file provider error during bulk load downloading
// - ERR_CORRUPTION: metadata corruption during bulk load downloading
1:dsn.error_code err;
1:pegasus.error_code err;
2:bulk_load_status status;
3:partition_bulk_load_state bulk_load_state;
}
Expand All @@ -162,9 +162,9 @@ struct ingestion_response
{
// Possible errors:
// - ERR_TRY_AGAIN: retry ingestion
1:dsn.error_code err;
1:pegasus.error_code err;
// rocksdb ingestion error code
2:i32 rocksdb_error;
2:i32 rocksdb_error;
}

enum bulk_load_control_type
Expand All @@ -189,8 +189,8 @@ struct control_bulk_load_response
// - ERR_APP_DROPPED: app has been dropped
// - ERR_INACTIVE_STATE: app is not executing bulk load
// - ERR_INVALID_STATE: current bulk load process can not be paused/restarted/canceled
1:dsn.error_code err;
2:optional string hint_msg;
1:pegasus.error_code err;
2:optional string hint_msg;
}

struct query_bulk_load_request
Expand All @@ -209,15 +209,15 @@ struct query_bulk_load_response
// - ERR_CORRUPTION: file not exist or damaged
// - ERR_INGESTION_FAILED: ingest failed
// - ERR_RETRY_EXHAUSTED: retry too many times
1:dsn.error_code err;
2:string app_name;
3:bulk_load_status app_status;
4:list<bulk_load_status> partitions_status;
5:i32 max_replica_count;
1:pegasus.error_code err;
2:string app_name;
3:bulk_load_status app_status;
4:list<bulk_load_status> partitions_status;
5:i32 max_replica_count;
// detailed bulk load state for each replica
6:list<map<dsn.rpc_address, partition_bulk_load_state>> bulk_load_states;
7:optional string hint_msg;
8:optional bool is_bulk_loading;
6:list<map<pegasus.rpc_address, partition_bulk_load_state>> bulk_load_states;
7:optional string hint_msg;
8:optional bool is_bulk_loading;
}

struct clear_bulk_load_state_request
Expand All @@ -231,6 +231,6 @@ struct clear_bulk_load_state_response
// - ERR_APP_NOT_EXIST: app not exist
// - ERR_APP_DROPPED: app has been dropped
// - ERR_INVALID_STATE: app is executing bulk load
1:dsn.error_code err;
2:string hint_msg;
1:pegasus.error_code err;
2:string hint_msg;
}
2 changes: 1 addition & 1 deletion idl/command.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* THE SOFTWARE.
*/

namespace cpp dsn.dist.cmd
namespace cpp pegasus.dist.cmd
namespace go cmd

struct command
Expand Down
Loading