Skip to content

Commit

Permalink
Update ForestDB to fix builder bug (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
greensky00 authored Jan 19, 2024
1 parent 279647e commit 05836d2
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion manifest.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FORESTDB_COMMIT="46b8aad1897cab70fe81fc10165139e6d6db30e0"
FORESTDB_COMMIT="c2a0cf7e708e2a1fb883bca1f2f3d6c3c648812e"
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 05836d2

Please sign in to comment.