iotdb
iotdb copied to clipboard
Fix schema query stuck when system is readonly
Currently, SchemaRegion has LINEARIZABLE reads set up, and its state machine stops writing when the system is readonly, potentially causing the query to freeze indefinitely.
In fact, we only need to process dataRegion, because the semantics of readonly itself does not prevent metadata from being written. In addition, dataregion is not LINEARIZABLE read by default. Therefore, even if the dataregion is ratis, there will be no stuck problem.
In addition, the problem comes from the earliest issue, the current shutdownhook would stop the RPC client service at the beginning, Therefore, this change will not cause any worse effects.