Skip to content

Commit

Permalink
[tsdb][read_sector_info]: fix read last valid tsl (#302)
Browse files Browse the repository at this point in the history
Co-authored-by: wuchushun <wuchushun@kaadas.com>
  • Loading branch information
shun-dgut and wuchushun authored Jul 25, 2024
1 parent 60675db commit 8f80336
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fdb_tsdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ static fdb_err_t read_sector_info(fdb_tsdb_t db, uint32_t addr, tsdb_sec_info_t

tsl.addr.index = sector->empty_idx;
while (read_tsl(db, &tsl) == FDB_NO_ERR) {
if (tsl.status == FDB_TSL_UNUSED) {
if (tsl.status == FDB_TSL_UNUSED || tsl.status == FDB_TSL_PRE_WRITE) {
break;
}
sector->end_time = tsl.time;
Expand Down

0 comments on commit 8f80336

Please sign in to comment.