-
Notifications
You must be signed in to change notification settings - Fork 411
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[flash-557]change branch of client-c (#275)
* change branch of client-c * add client-c * retry get safepoint * change for client-c * update submodule * Fix a clang flag * address comments * Remove questionable warning flags
- Loading branch information
1 parent
9fa88a2
commit 8fbd0f8
Showing
12 changed files
with
46 additions
and
31 deletions.
There are no files selected for viewing
Submodule client-c
updated
27 files
+0 −2 | .gitignore | |
+16 −8 | include/pingcap/Exception.h | |
+0 −0 | include/pingcap/Log.h | |
+3 −3 | include/pingcap/kv/Backoff.h | |
+6 −5 | include/pingcap/kv/Region.h | |
+10 −25 | include/pingcap/kv/RegionClient.h | |
+2 −4 | include/pingcap/kv/Rpc.h | |
+4 −4 | include/pingcap/kv/Scanner.h | |
+1 −1 | include/pingcap/kv/Snapshot.h | |
+3 −3 | include/pingcap/kv/Util.h | |
+3 −4 | include/pingcap/pd/Client.h | |
+0 −0 | include/pingcap/pd/IClient.h | |
+1 −1 | include/pingcap/pd/MockPDClient.h | |
+4 −4 | src/CMakeLists.txt | |
+4 −3 | src/kv/Backoff.cc | |
+33 −27 | src/kv/Region.cc | |
+1 −1 | src/kv/Rpc.cc | |
+4 −4 | src/kv/Snapshot.cc | |
+10 −17 | src/pd/Client.cc | |
+1 −1 | src/test/MockTiKV.h | |
+3 −3 | src/test/get_region_id_wrong_test.cc | |
+5 −4 | src/test/get_store_id_wrong_2_test.cc | |
+4 −3 | src/test/get_store_id_wrong_test.cc | |
+4 −3 | src/test/grpc_error_test.cc | |
+3 −4 | src/test/pd_test.cc | |
+4 −3 | src/test/read_index_test.cc | |
+1 −0 | third_party/kvproto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#include <pingcap/pd/IClient.h> | ||
#include <pingcap/kv/Backoff.h> | ||
|
||
namespace DB | ||
{ | ||
|
||
// TODO:: Implement Read Index Client; | ||
|
||
struct PDClientHelper | ||
{ | ||
|
||
static constexpr int get_safepoint_maxtime = 120000; // 120s. waiting pd recover. | ||
|
||
static uint64_t getGCSafePointWithRetry(pingcap::pd::ClientPtr pd_client) | ||
{ | ||
pingcap::kv::Backoffer bo(get_safepoint_maxtime); | ||
for (;;) | ||
{ | ||
try | ||
{ | ||
auto safe_point = pd_client->getGCSafePoint(); | ||
return safe_point; | ||
} | ||
catch (pingcap::Exception & e) | ||
{ | ||
bo.backoff(pingcap::kv::boPDRPC, e); | ||
} | ||
} | ||
} | ||
}; | ||
|
||
|
||
} // namespace DB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters