Fix ExternalSSTFileTest::OverlappingRanges test on Solaris Sparc (#4012)

Summary:
Fix of #4011
Closes https://github.com/facebook/rocksdb/pull/4012

Differential Revision: D8499173

Pulled By: sagar0

fbshipit-source-id: cbb2b90c544ed364a3640ea65835d577b2dbc5df
main
Tomas Kolda 7 years ago committed by Facebook Github Bot
parent 7b4b43febb
commit c766887458
  1. 8
      db/external_sst_file_test.cc

@ -897,11 +897,11 @@ TEST_F(ExternalSSTFileTest, MultiThreaded) {
TEST_F(ExternalSSTFileTest, OverlappingRanges) { TEST_F(ExternalSSTFileTest, OverlappingRanges) {
Random rnd(301); Random rnd(301);
int picked_level = 0; SequenceNumber assigned_seqno = 0;
rocksdb::SyncPoint::GetInstance()->SetCallBack( rocksdb::SyncPoint::GetInstance()->SetCallBack(
"ExternalSstFileIngestionJob::Run", [&picked_level](void* arg) { "ExternalSstFileIngestionJob::Run", [&assigned_seqno](void* arg) {
ASSERT_TRUE(arg != nullptr); ASSERT_TRUE(arg != nullptr);
picked_level = *(static_cast<int*>(arg)); assigned_seqno = *(static_cast<SequenceNumber*>(arg));
}); });
bool need_flush = false; bool need_flush = false;
rocksdb::SyncPoint::GetInstance()->SetCallBack( rocksdb::SyncPoint::GetInstance()->SetCallBack(
@ -982,7 +982,7 @@ TEST_F(ExternalSSTFileTest, OverlappingRanges) {
} }
} else { } else {
if ((it != true_data.end() && it->first <= Key(range_end)) || if ((it != true_data.end() && it->first <= Key(range_end)) ||
need_flush || picked_level > 0 || overlap_with_db) { need_flush || assigned_seqno > 0 || overlap_with_db) {
// This range overlap with data already exist in DB // This range overlap with data already exist in DB
ASSERT_NOK(s); ASSERT_NOK(s);
failed_add_file++; failed_add_file++;

Loading…
Cancel
Save