[tsdb] the tsl will drop when cur timestamp is equal to the last save timestamp

This commit is contained in:
朱天龙 (Armink) 2023-04-22 10:00:10 +08:00
parent 7fd3db6740
commit 6e8e9e7780
1 changed files with 2 additions and 2 deletions

View File

@ -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);
/* check the current timestamp, MUST more than the last save timestamp */
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",
if (cur_time <= db->last_time) {
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));
return FDB_WRITE_ERR;
}