Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
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
- is duplicated by
-
IOTDB-3793 Database becomes read-only,I feel the bug is Critical
- Closed
- relates to
-
IOTDB-3855 [ MultiLeaderConsensus +wal ] After “No space left on device”,wal file has empty file
- Closed
-
IOTDB-3679 [ read-only ] tsfile is still being created after datanode read-only
- Closed
- links to