Skip to content

Commit

Permalink
Fix LITE build with DBTest2.AutoPrefixMode1 (facebook#6346)
Browse files Browse the repository at this point in the history
Summary:
DBTest2.AutoPrefixMode1 doesn't pass because auto prefix mode is not supported there.
Fix it by disabling the test.
Pull Request resolved: facebook#6346

Test Plan: Run DBTest2.AutoPrefixMode1 in lite mode

Differential Revision: D19627486

fbshipit-source-id: fbde75260aeecb7e6fc406e09c19a71a95aa5f08
  • Loading branch information
siying authored and facebook-github-bot committed Jan 30, 2020
1 parent 23dcf27 commit 71874c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions db/db_test2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4404,6 +4404,7 @@ TEST_F(DBTest2, BlockBasedTablePrefixGetIndexNotFound) {
ASSERT_EQ("ok", Get("b1"));
}

#ifndef ROCKSDB_LITE
TEST_F(DBTest2, AutoPrefixMode1) {
// create a DB with block prefix index
BlockBasedTableOptions table_options;
Expand Down Expand Up @@ -4510,6 +4511,7 @@ TEST_F(DBTest2, AutoPrefixMode1) {
ASSERT_EQ("a1", iterator->key().ToString());
}
}
#endif // ROCKSDB_LITE
} // namespace rocksdb

#ifdef ROCKSDB_UNITTESTS_WITH_CUSTOM_OBJECTS_FROM_STATIC_LIBS
Expand Down
2 changes: 2 additions & 0 deletions include/rocksdb/options.h
Original file line number Diff line number Diff line change
Expand Up @@ -1254,6 +1254,8 @@ struct ReadOptions {
// When true, by default use total_order_seek = true, and RocksDB can
// selectively enable prefix seek mode if won't generate a different result
// from total_order_seek, based on seek key, and iterator upper bound.
// Not suppported in ROCKSDB_LITE mode, in the way that even with value true
// prefix mode is not used.
bool auto_prefix_mode;

// Enforce that the iterator only iterates over the same prefix as the seek.
Expand Down

0 comments on commit 71874c5

Please sign in to comment.