Uploaded image for project: 'Apache IoTDB'
  1. Apache IoTDB
  2. IOTDB-3843

Refine the using of setting read-only

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.14.0
    • None
    • 2022-8-Cluster

    Description

      We now abuse the system read-only, which is a dangerous operation.

      Even worse, when system is set to read-only, I could not find why we set it to read-only, there is no related log.

       

      We only set read-only when losing data continuously, otherwise, we must store more data as we can.

       

      (1) Add a parameter to let user choose how to handle error in IO: shutdown or set readonly.

      (2) Change readOnly field to an enum class SystemStatus, which contains NORMAL and READONLY, and open a SQL for the user to query.

      (3) In the IoTDBConfig.setReadOnly() function, if it receive a true, we need to log the stack trace with the information "change system mode to read-only". To avoid missing the log outside.

      if (readOnly)

      { logger.error("change system mode to read-only", new RuntimeException()); }

      (4) Check all places that set read-only, this is a dangerous operation in the deployment environment, and we should avoid using this if not necessary.

      Attachments

        Issue Links

          Activity

            People

              HeimingZ Haiming Zhu
              qiaojialin Jialin Qiao
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: