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 2022/08/12 07:38:12 UTC

[GitHub] [iotdb] HTHou commented on a diff in pull request #6968: [IOTDB-3843] Refine the using of setting read-only

HTHou commented on code in PR #6968:
URL: https://github.com/apache/iotdb/pull/6968#discussion_r944193788


##########
server/src/main/java/org/apache/iotdb/db/mpp/plan/scheduler/StandaloneScheduler.java:
##########
@@ -123,6 +124,13 @@ public void start() {
         LOGGER.info("{} state tracker starts", getLogHeader());
         break;
       case WRITE:
+        // reject non-query operations when system is read-only
+        if (IoTDBDescriptor.getInstance().getConfig().isReadOnly()) {
+          TSStatus failedStatus = new TSStatus(TSStatusCode.NODE_READ_ONLY.getStatusCode());

Review Comment:
   Why do you use `TSStatusCode.NODE_READ_ONLY` rather than `TSStatusCode.READ_ONLY_SYSTEM_ERROR` ?



-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

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