You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ha...@apache.org on 2022/07/19 01:14:34 UTC
[iotdb] branch rel/0.13 updated: [IOTDB-3851] C++ client method of tablet sorting optimization (#6700)
This is an automated email from the ASF dual-hosted git repository.
haonan pushed a commit to branch rel/0.13
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/rel/0.13 by this push:
new 7d2ef8bcf1 [IOTDB-3851] C++ client method of tablet sorting optimization (#6700)
7d2ef8bcf1 is described below
commit 7d2ef8bcf1963e40b99190d719bcfc81758eb43b
Author: liruizhi19 <10...@users.noreply.github.com>
AuthorDate: Tue Jul 19 09:14:29 2022 +0800
[IOTDB-3851] C++ client method of tablet sorting optimization (#6700)
---
client-cpp/src/main/Session.cpp | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/client-cpp/src/main/Session.cpp b/client-cpp/src/main/Session.cpp
index 4ca93e143a..e27fe755c3 100644
--- a/client-cpp/src/main/Session.cpp
+++ b/client-cpp/src/main/Session.cpp
@@ -1015,11 +1015,7 @@ void Session::insertTablet(Tablet &tablet) {
}
void Session::insertTablet(Tablet &tablet, bool sorted) {
- if (sorted) {
- if (!checkSorted(tablet)) {
- throw BatchExecutionException("Times in Tablet are not in ascending order");
- }
- } else {
+ if (!checkSorted(tablet)) {
sortTablet(tablet);
}
@@ -1085,11 +1081,7 @@ void Session::insertTablets(unordered_map<string, Tablet *> &tablets, bool sorte
if (isFirstTabletAligned != item.second->isAligned) {
throw BatchExecutionException("The tablets should be all aligned or non-aligned!");
}
- if (sorted) {
- if (!checkSorted(*(item.second))) {
- throw BatchExecutionException("Times in Tablet are not in ascending order");
- }
- } else {
+ if (!checkSorted(*(item.second))) {
sortTablet(*(item.second));
}
request.prefixPaths.push_back(item.second->deviceId);