Data timestamp out of order

hi.
i am new to this.
I have a question that’s been bothering me for a long time.
How does tsdb handle timestamp out of order, such as data arriving first with timestamp 1,3,5,6,7. The latest data has a timestamp of 4,5,6,7… ; Will the later data overwrite the previous data?
Example:
previous data
time value

2020-04-02 01:00:00 10
2020-04-02 02:00:00 20
2020-04-02 03:00:00 30
2020-04-02 04:00:00 40
2020-04-02 05:00:00 20
2020-04-02 07:00:00 30
2020-04-02 09:00:00 40

later data
time value

2020-04-02 04:00:00 60
2020-04-02 05:00:00 90
2020-04-02 07:00:00 60
2020-04-02 09:00:00 80