Skip to content

[IOTDB-1531] Check tsfile creation time when recovering#3642

Merged
qiaojialin merged 2 commits intoapache:masterfrom
HeimingZ:IOTDB-1531(check_tsfile_time_when_recovering)
Aug 16, 2021
Merged

[IOTDB-1531] Check tsfile creation time when recovering#3642
qiaojialin merged 2 commits intoapache:masterfrom
HeimingZ:IOTDB-1531(check_tsfile_time_when_recovering)

Conversation

@HeimingZ
Copy link
Copy Markdown
Contributor

@HeimingZ HeimingZ commented Jul 28, 2021

Check tsfile's time when recovering, make sure all tsfile time are less than System.currentTimeMillis(). If the tsfile's time is larger than System.currentTimeMillis(), the recover of corresponding virtual storage group will fail, users cannot read/write this virtual storage group until the time of the tsfile is correct.

Before fixing time:
before fix
After fixing time:
after fix

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.007%) to 68.217% when pulling bccd936 on HeimingZ:IOTDB-1531(check_tsfile_time_when_recovering) into 0b2d0af on apache:master.

@wangchao316
Copy link
Copy Markdown
Member

I have a little question. why all tsfile time are less than System.currentTimeMillis()?
if tsfile time are better than System.currentTimeMillis(), Does iotdb-server used?
The time of real data may change due to a fault in the collection device (data is later than the current time). In this case, the entire cluster cannot be used.

@HeimingZ
Copy link
Copy Markdown
Contributor Author

HeimingZ commented Aug 2, 2021

I have a little question. why all tsfile time are less than System.currentTimeMillis()?
if tsfile time are better than System.currentTimeMillis(), Does iotdb-server used?
The time of real data may change due to a fault in the collection device (data is later than the current time). In this case, the entire cluster cannot be used.

tsfile name time

This pr aims to make sure server time zone is correct and all tsfiles' created time is less than system current time. It only compares the created time of tsfile, which is determined by the server, so data from devices won't affect the use of iotdb.

@qiaojialin qiaojialin changed the title [IOTDB-1531] Check tsfile time when recovering [IOTDB-1531] Check tsfile creation time when recovering Aug 16, 2021
@qiaojialin qiaojialin merged commit 7ea4f0d into apache:master Aug 16, 2021
@HeimingZ HeimingZ deleted the IOTDB-1531(check_tsfile_time_when_recovering) branch August 18, 2021 08:32
sailing27 pushed a commit to sailing27/iotdb that referenced this pull request Aug 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants