Skip to content

Commit

Permalink
Update ForestDB to fix builder bug
Browse files Browse the repository at this point in the history
  • Loading branch information
greensky00 committed Jan 19, 2024
1 parent 279647e commit f242478
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
17 changes: 17 additions & 0 deletions tests/jungle/builder_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,23 @@ int builder_api_test(bool compression) {
CHK_EQ(val_buf.toString(), value_out.toString());
}

// Iteration from the middle of sequence number should work.
jungle::Status s;
jungle::Iterator itr;
CHK_Z( itr.initSN(db, NUM / 2) );
uint64_t seqnum_cnt = NUM / 2;
do {
jungle::Record rec_out;
jungle::Record::Holder h_rec_out(rec_out);
s = itr.get(rec_out);
if (!s.ok()) break;

CHK_EQ(seqnum_cnt, rec_out.seqNum);
seqnum_cnt++;
} while (itr.next().ok());
CHK_Z( itr.close() );
CHK_EQ(NUM + 1, seqnum_cnt);

CHK_Z( jungle::DB::close(db) );
CHK_Z( jungle::shutdown() );

Expand Down
2 changes: 1 addition & 1 deletion third_party/forestdb

0 comments on commit f242478

Please sign in to comment.