Skip to content

Commit 2bbc2a4

Browse files
rock-gitketor
authored andcommitted
[feat][br] Support just_store param.
1 parent f5de9ac commit 2bbc2a4

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

src/br/main.cc

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -535,16 +535,18 @@ int main(int argc, char* argv[]) {
535535
return -1;
536536
}
537537

538-
status = SetIndexInteraction();
539-
if (!status.ok()) {
540-
DINGO_LOG(ERROR) << br::Utils::FormatStatusError(status);
541-
return -1;
542-
}
538+
if (!br::FLAGS_just_store) {
539+
status = SetIndexInteraction();
540+
if (!status.ok()) {
541+
DINGO_LOG(ERROR) << br::Utils::FormatStatusError(status);
542+
return -1;
543+
}
543544

544-
status = SetDocumentInteraction();
545-
if (!status.ok()) {
546-
DINGO_LOG(ERROR) << br::Utils::FormatStatusError(status);
547-
return -1;
545+
status = SetDocumentInteraction();
546+
if (!status.ok()) {
547+
DINGO_LOG(ERROR) << br::Utils::FormatStatusError(status);
548+
return -1;
549+
}
548550
}
549551
} // if (br::FLAGS_br_type == "backup" || br::FLAGS_br_type == "restore" || (br::FLAGS_br_type == "tool") &&
550552
// br::FLAGS_br_tool_type == "client")) {

src/br/parameter.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
#include "br/parameter.h"
1616

17+
#include "gflags/gflags.h"
18+
1719
namespace br {
1820

1921
DEFINE_string(br_coor_url, "", "coordinator url");
@@ -113,4 +115,6 @@ DEFINE_string(br_client_method, "", "br client method. default empty");
113115
// br client method param1
114116
DEFINE_string(br_client_method_param1, "", "br client method param1. default empty");
115117

118+
DEFINE_bool(just_store, false, "just store server");
119+
116120
} // namespace br

src/br/parameter.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,8 @@ DECLARE_string(br_client_method);
163163
// br client method param1
164164
DECLARE_string(br_client_method_param1);
165165

166+
DECLARE_bool(just_store);
167+
166168
} // namespace br
167169

168170
#endif // DINGODB_BR_PARAMETER_H_

0 commit comments

Comments
 (0)