qiaojialin commented on a change in pull request #2173:
URL: https://github.com/apache/iotdb/pull/2173#discussion_r534866277



##########
File path: 
server/src/main/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java
##########
@@ -692,6 +696,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 {
+        StorageEngine.blockInsertionIfReject();
+      } catch (WriteProcessException e) {
+        TSStatus[] results = new TSStatus[insertTabletPlan.getRowCount()];
+        Arrays.fill(results, 
RpcUtils.getStatus(TSStatusCode.INTERNAL_SERVER_ERROR));

Review comment:
       add a new ErrorCode




----------------------------------------------------------------
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:
[email protected]


Reply via email to