From a5a95b8ebb3598f5c47e46e1196971cd161b7101 Mon Sep 17 00:00:00 2001 From: Jung-Sang Ahn Date: Wed, 10 Jan 2024 12:08:16 -0800 Subject: [PATCH] Fix to bug in DB builder * We should set the special flag for ForestDB, otherwise the custom sequence number will be ignored. --- src/jungle_builder.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/jungle_builder.cc b/src/jungle_builder.cc index 6ebe754..22ffbd0 100644 --- a/src/jungle_builder.cc +++ b/src/jungle_builder.cc @@ -230,6 +230,7 @@ Status Builder::set(const Record& rec) { doc.meta = raw_meta.data; doc.metalen = raw_meta.size; doc.seqnum = (rec.seqNum == Record::NIL_SEQNUM) ? seqnumCounter++ : rec.seqNum; + doc.flags = FDB_CUSTOM_SEQNUM; curMaxSeqnum = std::max(curMaxSeqnum, doc.seqnum); if (curMinKey.empty()) {