mirror of
https://github.com/armink/FlashDB.git
synced 2025-01-29 04:32:53 +08:00
[tsdb] the tsl will drop when cur timestamp is equal to the last save timestamp
This commit is contained in:
parent
7fd3db6740
commit
6e8e9e7780
@ -389,8 +389,8 @@ static fdb_err_t tsl_append(fdb_tsdb_t db, fdb_blob_t blob)
|
|||||||
FDB_ASSERT(blob->size <= db->max_len);
|
FDB_ASSERT(blob->size <= db->max_len);
|
||||||
|
|
||||||
/* check the current timestamp, MUST more than the last save timestamp */
|
/* check the current timestamp, MUST more than the last save timestamp */
|
||||||
if (cur_time < db->last_time) {
|
if (cur_time <= db->last_time) {
|
||||||
FDB_INFO("Warning: current timestamp (%" PRIdMAX ") is less than the last save timestamp (%" PRIdMAX "). This tsl will be dropped.\n",
|
FDB_INFO("Warning: current timestamp (%" PRIdMAX ") is less than or equal to the last save timestamp (%" PRIdMAX "). This tsl will be dropped.\n",
|
||||||
(intmax_t )cur_time, (intmax_t )(db->last_time));
|
(intmax_t )cur_time, (intmax_t )(db->last_time));
|
||||||
return FDB_WRITE_ERR;
|
return FDB_WRITE_ERR;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user