From 6e8e9e77806a56a0e7ce287e7d1a6e0a4053196c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E5=A4=A9=E9=BE=99=20=28Armink=29?= Date: Sat, 22 Apr 2023 10:00:10 +0800 Subject: [PATCH] [tsdb] the tsl will drop when cur timestamp is equal to the last save timestamp --- src/fdb_tsdb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fdb_tsdb.c b/src/fdb_tsdb.c index 38561aa..a931fe2 100644 --- a/src/fdb_tsdb.c +++ b/src/fdb_tsdb.c @@ -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; }