Skip to content

Commit

Permalink
build: add braft format patch
Browse files Browse the repository at this point in the history
Signed-off-by: Hanqing Wu <[email protected]>
  • Loading branch information
wu-hanqing committed Sep 25, 2023
1 parent 493e365 commit de6984e
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
6 changes: 6 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ git_repository(
name = "com_github_baidu_braft",
remote = "https://github.com/baidu/braft",
commit = "d12de388c97998f5ccd5cb97ed0da728815ef438",
patches = [
"//:thirdparties/braft/0001-fix-change-set_error-to-set_errorv.patch",
],
patch_args = [
"-p1"
],
)

bind(
Expand Down
25 changes: 25 additions & 0 deletions thirdparties/braft/0001-fix-change-set_error-to-set_errorv.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From 5a6d0378fb7c913f5410ec105e5c6db5259d32fe Mon Sep 17 00:00:00 2001
From: Hanqing Wu <[email protected]>
Date: Wed, 26 Jul 2023 17:41:22 +0800
Subject: [PATCH] fix: change set_error to set_errorv

---
src/braft/log_manager.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/braft/log_manager.cpp b/src/braft/log_manager.cpp
index cf07775..75e2597 100644
--- a/src/braft/log_manager.cpp
+++ b/src/braft/log_manager.cpp
@@ -939,7 +939,7 @@ void LogManager::report_error(int error_code, const char* fmt, ...) {
va_start(ap, fmt);
Error e;
e.set_type(ERROR_TYPE_LOG);
- e.status().set_error(error_code, fmt, ap);
+ e.status().set_errorv(error_code, fmt, ap);
va_end(ap);
_fsm_caller->on_error(e);
}
--
2.37.2

0 comments on commit de6984e

Please sign in to comment.