You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2020/12/02 19:45:25 UTC

[GitHub] [iotdb] jixuan1989 commented on a change in pull request #2154: [Mem control] Move one of the insert check out from the sg lock

jixuan1989 commented on a change in pull request #2154:
URL: https://github.com/apache/iotdb/pull/2154#discussion_r534436019



##########
File path: server/src/main/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java
##########
@@ -710,6 +717,15 @@ public void insert(InsertRowPlan insertRowPlan) throws WriteProcessException {
    */
   @SuppressWarnings("squid:S3776") // Suppress high Cognitive Complexity warning
   public void insertTablet(InsertTabletPlan insertTabletPlan) throws BatchInsertionException {
+    if (enableMemControl) {
+      try {
+        blockInsertionIfReject();
+      } catch (WriteProcessException e) {
+        TSStatus[] results = new TSStatus[insertTabletPlan.getRowCount()];
+        Arrays.fill(results, RpcUtils.SUCCESS_STATUS);

Review comment:
       SUCCESS_STATUS?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org