Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion api/broker.proto
Original file line number Diff line number Diff line change
Expand Up @@ -593,8 +593,16 @@ message ProjectConfig {
optional bool reveal_group_mark = 9;
// reveal the number of elements in each group
optional bool reveal_group_count = 10;
optional bool enable_session_logger_separation = 11;
Copy link
Collaborator

Choose a reason for hiding this comment

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

什么场景下需要用 optional?
有的字段用了:group_by_threshold 有的没有:psi_curve_type

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

如果无法区分没配置还是配置的默认值的,就用的 optional
比如 reveal_group_count 配置为 false,和不配置,在不用 optional 的情况下无法区分,加了 optional 之后,不配置会产生一个空指针,可以区分

PsiAlgorithmType psi_type = 12;
optional bool use_rr22_low_comm_mode = 13;
optional bool batched = 14;
// job's time_zone for session, default is empty which means use engine's
// default time_zone
string time_zone = 15;
}

// JobConfig is a subset of ProjectConfig.
message JobConfig {
// if the value is 0 which means user does not set it, it would fallback to
// project default setting
Expand All @@ -607,8 +615,10 @@ message JobConfig {
int64 link_recv_timeout_sec = 5;
int64 link_throttle_window_size = 6;
int64 link_chunked_send_parallel_size = 7;
bool enable_session_logger_separation = 8;
optional bool enable_session_logger_separation = 8;
PsiAlgorithmType psi_type = 9;
optional bool use_rr22_low_comm_mode = 10;
optional bool batched = 11;
}

message InviteMemberRequest {
Expand Down
Loading