Zhong Wang created IOTDB-2042: --------------------------------- Summary: Data loss after restart Key: IOTDB-2042 URL: https://issues.apache.org/jira/browse/IOTDB-2042 Project: Apache IoTDB Issue Type: Bug Reporter: Zhong Wang
Way to reproduce: 1. Enable time partitioning. Set the partition_interval to 2592000 (30 days). 2. Start a 3 node cluster with 2 replicas. 3. Insert the following values on node 3: {code:sql} insert into root.group_1.d_1(timestamp, s_1) values(2018-07-18T00:00:00.000+08:00, 18.0) insert into root.group_1.d_1(timestamp, s_1) values(2018-07-19T00:00:00.000+08:00, 19.0) insert into root.group_1.d_1(timestamp, s_1) values(2019-08-19T00:00:00.000+08:00, 20.0) {code} 4. Restart the cluster. 5. Execute the following query on each node. Node 2 will return an empty result set: {code:sql} SELECT * FROM root {code} Some of the TSFiles are empty after recovery, which is unexpected. Reason: When time partitioning is enabled, although the data of a time series can be distributed across the whole cluster, its metadata is only stored in the data group corresponding to the hash value calculated from its storage group and timestamp 0. When a node from another data group receives insertions of the time series, it will send a request to whoever has the metadata and cache the response, but the cache will not be persisted. Thus, if the node crashes, it is not able to recover from the WAL since the cache is not available anymore. -- This message was sent by Atlassian Jira (v8.20.1#820001)