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/18 02:37:00 UTC
[iotdb] branch master updated: [IOTDB-3851] C++ client method of tablet sorting optimization (#6690)
This is an automated email from the ASF dual-hosted git repository.
haonan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new 967cde609a [IOTDB-3851] C++ client method of tablet sorting optimization (#6690)
967cde609a is described below
commit 967cde609aa81751f3433ee6519d114a8fed3abf
Author: liruizhi19 <10...@users.noreply.github.com>
AuthorDate: Mon Jul 18 10:36:55 2022 +0800
[IOTDB-3851] C++ client method of tablet sorting optimization (#6690)
---
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 52de4e69c0..99205f337f 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);