1. 19 6月, 2015 1 次提交
    • Y
      Remove unused target --- compactor_test · 71b438c4
      Yueh-Hsuan Chiang 提交于
      Summary:
      Remove compactor_test, which depends on a directory not exist
      in our code base.
          make compactor_test
          GEN      util/build_version.cc
          GEN      util/build_version.cc
          make: *** No rule to make target `utilities/compaction/compactor_test.o', needed by `compactor_test'.  Stop.
      
      Test Plan: verify the output message of make compactor_test
      
      Reviewers: rven, anthony, kradhakrishnan, igor, IslamAbdelRahman, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D40341
      71b438c4
  2. 11 6月, 2015 1 次提交
  3. 03 6月, 2015 1 次提交
    • Y
      Allow EventListener::OnCompactionCompleted to return CompactionJobStats. · fe5c6321
      Yueh-Hsuan Chiang 提交于
      Summary:
      Allow EventListener::OnCompactionCompleted to return CompactionJobStats,
      which contains useful information about a compaction.
      
      Example CompactionJobStats returned by OnCompactionCompleted():
          smallest_output_key_prefix 05000000
          largest_output_key_prefix 06990000
          elapsed_time 42419
          num_input_records 300
          num_input_files 3
          num_input_files_at_output_level 2
          num_output_records 200
          num_output_files 1
          actual_bytes_input 167200
          actual_bytes_output 110688
          total_input_raw_key_bytes 5400
          total_input_raw_value_bytes 300000
          num_records_replaced 100
          is_manual_compaction 1
      
      Test Plan: Developed a mega test in db_test which covers 20 variables in CompactionJobStats.
      
      Reviewers: rven, igor, anthony, sdong
      
      Reviewed By: sdong
      
      Subscribers: tnovak, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D38463
      fe5c6321
  4. 30 5月, 2015 2 次提交
    • A
      Optimistic Transactions · dc9d70de
      agiardullo 提交于
      Summary: Optimistic transactions supporting begin/commit/rollback semantics.  Currently relies on checking the memtable to determine if there are any collisions at commit time.  Not yet implemented would be a way of enuring the memtable has some minimum amount of history so that we won't fail to commit when the memtable is empty.  You should probably start with transaction.h to get an overview of what is currently supported.
      
      Test Plan: Added a new test, but still need to look into stress testing.
      
      Reviewers: yhchiang, igor, rven, sdong
      
      Reviewed By: sdong
      
      Subscribers: adamretter, MarkCallaghan, leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D33435
      dc9d70de
    • I
      Decrease number of jobs in make release · a3da5902
      Igor Canadi 提交于
      Summary: as title
      
      Test Plan: make release
      
      Reviewers: MarkCallaghan, sdong
      
      Reviewed By: sdong
      
      Subscribers: sdong, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D38853
      a3da5902
  5. 23 5月, 2015 1 次提交
    • I
      Run tests sequentally if J=1 · 309a9d07
      Igor Canadi 提交于
      Summary: Sometimes we want to run tests sequentially. J=1 gives us that option
      
      Test Plan:
      make J=1 check -- sequential
      make J=2 check -- parallel
      
      Reviewers: sdong, yhchiang, meyering
      
      Reviewed By: meyering
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D38805
      309a9d07
  6. 20 5月, 2015 2 次提交
  7. 16 5月, 2015 1 次提交
    • S
      Use version defined in Makefile in rocksdb_build_git_sha · 8c52788f
      sdong 提交于
      Summary: Now rocksdb_build_git_sha is determined from "git sha". It is hard if the release is not from the repository directly but from a source code copy. Change to use the versions given in Makefile.
      
      Test Plan: Run "make util/build_version.cc"
      
      Reviewers: kradhakrishnan, rven, meyering, igor
      
      Reviewed By: igor
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D38451
      8c52788f
  8. 09 5月, 2015 1 次提交
  9. 08 5月, 2015 1 次提交
    • I
      rm -rf in make clean · beda81c5
      Igor Canadi 提交于
      Summary: Without this I get bunch of questions when I run `make clean`
      
      Test Plan: no more questions!
      
      Reviewers: rven, yhchiang, meyering, anthony
      
      Reviewed By: meyering, anthony
      
      Subscribers: meyering, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D38145
      beda81c5
  10. 06 5月, 2015 1 次提交
    • I
      Don't treat warnings as error when building release · a2c4cc75
      Igor Canadi 提交于
      Summary: This will reduce errors reported by open source by 90%. Developers should have warnings break their compile. Users shouldn't.
      
      Test Plan:
      make dbg:
      g++  -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wno-unused-parameter -Werror -I. -I./include -std=c++11  -DROCKSDB_PLATFORM_POSIX  -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=gflags -DZLIB -DBZIP2 -march=native   -isystem ./third-party/gtest-1.7.0/fused-src  -Woverloaded-virtual -Wn
      on-virtual-dtor -Wno-missing-field-initializers -c db/repair.cc -o db/repair.o
      
      make all:
      g++  -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wno-unused-parameter -Werror -I. -I./include -std=c++11  -DROCKSDB_PLATFORM_POSIX  -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=gflags -DZLIB -DBZIP2 -march=native   -isystem ./third-party/gtest-1.7.0/fused-src -O2 -fno-omit-frame-pointer -momit-leaf-frame-pointer -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/repair.cc -o db/repair.o
      
      make static_lib:
      g++  -g -W -Wextra -Wall -Wsign-compare -Wshadow -Wno-unused-parameter -I. -I./include -std=c++11  -DROCKSDB_PLATFORM_POSIX  -DOS_LINUX -fno-builtin-memcmp -DROCKSDB_FALLOCATE_PRESENT -DSNAPPY -DGFLAGS=gflags -DZLIB -DBZIP2 -march=native   -isystem ./third-party/gtest-1.7.0/fused-src -O2 -fno-omit-frame-pointer -momit-leaf-frame-pointer -DNDEBUG -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -c db/repair.cc -o db/repair.o
      
      Reviewers: sdong, yhchiang, rven
      
      Reviewed By: rven
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D38031
      a2c4cc75
  11. 21 4月, 2015 3 次提交
    • I
      One last fix to Makefile · d85d08c7
      Igor Canadi 提交于
      Summary: Based on comment from D37455
      
      Test Plan: make install after make static_lib
      
      Reviewers: meyering
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D37461
      d85d08c7
    • I
      Fix make install when there is no shared lib · 2db96dca
      Igor Canadi 提交于
      Summary: make install fails when there is no shared lib. We need to revert the conditions, which will have the same effect, but without the failure
      
      Test Plan: make install after only compiling static library
      
      Reviewers: meyering
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D37455
      2db96dca
    • I
      Fix Makefile · 79c1b021
      Igor Canadi 提交于
      Summary: The current version tries to install librocksdb.so even though it doesn't exist. This version will install librocksdb.so.3.10.0 and then create soft links in place
      
      Test Plan:
      `make static_lib; sudo make install` does not try to install librocksdb.so
      `make shared_lib; sudo make install` installs one library and 3 symlinks. Before, four libraries were installed
      
      Reviewers: sdong, meyering
      
      Reviewed By: meyering
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D37425
      79c1b021
  12. 14 4月, 2015 2 次提交
  13. 10 4月, 2015 3 次提交
    • A
      MemTableList tests · fabc1156
      agiardullo 提交于
      Summary: Add tests for MemTableList
      
      Test Plan: run test
      
      Reviewers: yhchiang, kradhakrishnan, sdong, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D36735
      fabc1156
    • S
      "make commit-prereq" doesn't really build ROCKSDB_LITE · 465b25ca
      sdong 提交于
      Summary: "make commit-prereq" uses "make release" which overrides OPT, so ROCKSDB_LITE is not covered. Fix it by using "make static_lib"
      
      Test Plan: Run it and see it fail (which is expected)
      
      Reviewers: yhchiang, meyering, rven, anthony, kradhakrishnan, igor
      
      Reviewed By: igor
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D36813
      465b25ca
    • I
      Remove use of whole-archive to include jemalloc · 91df4e96
      Igor Canadi 提交于
      Summary: I don't think we need to use whole-archive to include jemalloc. This change only affects our development builds -- it does not affect our open source builds (which don't support jemalloc) or our fbcode third-party2 builds (which use open-source build codepaths).
      
      Test Plan:
      make
      verify that jemalloc is running by running `MALLOC_CONF="prof:true" ./cache_test` and observing that file was created
      
      Reviewers: MarkCallaghan
      
      Reviewed By: MarkCallaghan
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D36783
      91df4e96
  14. 09 4月, 2015 2 次提交
    • I
      Fix Makefile · edbb08b5
      Igor Canadi 提交于
      Summary: These two files are test binaries and are not included in TESTS in Makefile.
      
      Test Plan: `make clean` now deletes those files, too
      
      Reviewers: sdong, kradhakrishnan, meyering
      
      Reviewed By: kradhakrishnan, meyering
      
      Subscribers: kradhakrishnan, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D36705
      edbb08b5
    • J
      build: create .o files specifically for java-related targets · 199313dc
      Jim Meyering 提交于
      Summary:
      When building rocksdbjava and rocksdbjavastatic, create -fPIC-enabled
      binaries in a temporary subdirectory, jl/.
      * Makefile (java_libobjects): New variable.
      (java_libobjects): New rule.
      (CLEAN_FILES): Arrange for "make clean" to remove that temporary dir.
      (rocksdbjavastatic): Depend on the new variable.
      Remove useless OPT=... line.
      (rocksdbjava): Likewise.
      
      Test Plan:
        JAVA_HOME=/usr/local/jdk-7u67-64 PATH=$JAVA_HOME/bin:$PATH \
          make rocksdbjavastatic
      
      Reviewers: yhchiang
      
      Reviewed By: yhchiang
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D36645
      199313dc
  15. 08 4月, 2015 2 次提交
    • J
      build: don't use a glob for java/rocksjni/* · cba59200
      Jim Meyering 提交于
      Summary:
      * src.mk (JNI_NATIVE_SOURCES): New variable, so we don't have to use
      a glob in Makefile
      * Makefile (JNI_NATIVE_SOURCES): Remove glob-using definition, now
      that the explicit list of sources is in src.mk.
      
      Test Plan:
        Run this:
          JAVA_HOME=/usr/local/jdk-7u67-64 PATH=$JAVA_HOME/bin:$PATH \
            make rocksdbjava
      
      Reviewers: yhchiang
      
      Reviewed By: yhchiang
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D36633
      cba59200
    • I
      Fix github issue #563 · c66483c1
      Igor Canadi 提交于
      Summary:
      As described in https://github.com/facebook/rocksdb/issues/563, we should add minor version to SONAME, since we break ABI with minor releases.
      
      I also turned PLATFORM_SHARED_VERSIONED to true by default. This is true in LevelDB and it was switched to false by D15117 for no apparent reason. It should only be false for iOS.
      
      Test Plan: `make shared_lib` produced librocksdb.dylib.3.10.0
      
      Reviewers: sdong, yhchiang, meyering
      
      Reviewed By: meyering
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D36573
      c66483c1
  16. 07 4月, 2015 1 次提交
    • J
      run 'make check's rules (and even subtests) in parallel · e3ee98b3
      Jim Meyering 提交于
      Summary:
      When GNU parallel is available, "make check" tests are now run in parallel.
      When /dev/shm is usable, we tell those tests to create temporary files therein.
      Now, the longest-running single test, db_test, (which is composed of hundreds of sub-tests)
      is no longer run sequentially: instead, each of its sub-tests is run independently, and can
      be parallelized along with all other tests. To make that process easier, this change
      creates a temporary directory, "t/", in which it puts a small script for each of those
      subtests. The output from each parallel-run test is now saved in t/log-TEST_NAME.
      
      When GNU parallel is not available, we run the tests in sequence, just as before.
      If GNU parallel is available and you don't like the default of running one subtest
      per core, you can invoke "make J=1 check" to run only one test at a time.
      Beware: this will take a long time, and it starts with the two longest-running tests, so you
      will wait for a long time before seeing any results. Instead, if you want to use fewer resources
      but still see useful progress, try "make J=60% check". That will attempt to ensure that 60% of
      the cores are occupied by test runs.
      
      To watch progress of individual tests (duration, success (PASS-or-FAIL), name), run "make watch-log"
      in the same directory from another window.  That will start with something like this:
      
      and when complete should show numbers/names like this:
      
        Every 0.1s: sort -k7,7nr -k4,4gr LOG|perl -n -e '@a=split("\t",$_,-1); $t=$a[8]; $t =~ s,^\./,,;' -e '$t =~ s, >.*,,; chomp $t;' -e '$t =~ /.*--gtest_filter=...  Wed Apr  1 10:51:42 2015
      
        152.221 PASS t/DBTest.FileCreationRandomFailure
        109.280 PASS t/DBTest.EncodeDecompressedBlockSizeTest
         82.315 PASS reduce_levels_test
         77.812 PASS t/DBTest.CompactionFilterWithValueChange
         73.236 PASS backupable_db_test
         63.428 PASS deletefile_test
         57.248 PASS table_test
         55.665 PASS prefix_test
         49.816 PASS t/DBTest.RateLimitingTest
        ...
      
      Test Plan:
      Timings (measured so as to exclude compile and link times):
      With this change, all tests complete in 2m40s on a system for which nproc prints 32.
      Prior to this this change, "make check" would take 24.5 minutes on that same system.
      
      Here are durations (in seconds) of the longest-running subtests:
      
      152.435 PASS t/DBTest.FileCreationRandomFailure
      107.070 PASS t/DBTest.EncodeDecompressedBlockSizeTest
       81.391 PASS ./reduce_levels_test
       71.587 PASS ./backupable_db_test
       61.746 PASS ./deletefile_test
       57.960 PASS ./table_test
       55.230 PASS ./prefix_test
       54.060 PASS t/DBTest.CompactionFilterWithValueChange
       48.873 PASS t/DBTest.RateLimitingTest
       47.569 PASS ./fault_injection_test
       46.593 PASS t/DBTest.Randomized
       42.662 PASS t/DBTest.CompactionFilter
       31.793 PASS t/DBTest.SparseMerge
       30.612 PASS t/DBTest.CompactionFilterV2
       25.891 PASS t/DBTest.GroupCommitTest
       23.863 PASS t/DBTest.DynamicLevelMaxBytesBase
       22.976 PASS ./rate_limiter_test
       18.942 PASS t/DBTest.OptimizeFiltersForHits
       16.851 PASS ./env_test
       15.399 PASS t/DBTest.CompactionFilterV2WithValueChange
       14.827 PASS t/DBTest.CompactionFilterV2NULLPrefix
      
      Reviewers: igor, sdong, rven, yhchiang, igor.sugak
      
      Reviewed By: igor.sugak
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D35379
      e3ee98b3
  17. 31 3月, 2015 1 次提交
    • I
      Makefile minor cleanup · 2511b7d9
      Igor Canadi 提交于
      Summary:
      Just couple of small changes:
      1. removed signal_test, since it doesn't seem useful and we don't even run it as part of `make check`
      2. moved perf_context_test to TESTS instead of PROGRAMS
      3. `make release` probably shouldn't compile benchmarks. We currently rely on `make release` building db_bench (via Jenkins), so I left db_bench there.
      
      This is just a minor cleanup. We need to rethink our targets since they are a bit messy right now. We can do this during our tech debt week.
      
      Test Plan: make release
      
      Reviewers: anthony, rven, yhchiang, sdong, meyering
      
      Reviewed By: meyering
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D36171
      2511b7d9
  18. 28 3月, 2015 1 次提交
    • J
      build: always attempt to update util/build_version.cc · 1c47c433
      Jim Meyering 提交于
      Summary:
      This fixes two bugs: "make clean" would never remove the generated
      file, util/build_version.cc, and since D33591, would be regenerated
      only if it were absent.
      * Makefile (clean): Remove the generated file.
      (util/build_version.cc): Depend on the no-prereq FORCE target,
      so that this target's rules are always run.
      Since this is a generated file, make it read-only.
      Also, be sure to remove the temporary file when it is the same
      as the original.
      
      Test Plan:
      Ensure that we attempt regeneration every time.
      Make it empty with an up-to-date time stamp and demonstrate
      that it is rebuilt with the expected content:
      
        $ : > util/build_version.cc
        $ make util/build_version.o
         GEN      util/build_version.cc
         GEN      util/build_version.d
         GEN      util/build_version.cc
         CC       util/build_version.o
        $ cat util/build_version.cc
        #include "build_version.h"
        const char* rocksdb_build_git_sha = "rocksdb_build_git_sha:v3.10-2-gb30e72a";
        const char* rocksdb_build_git_date = "rocksdb_build_git_date:2015-03-27";
        const char* rocksdb_build_compile_date = __DATE__;
      
      Reviewers: igor.sugak, sdong, ljin, igor, rven
      
      Reviewed By: rven
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D36087
      1c47c433
  19. 26 3月, 2015 1 次提交
    • J
      TSAN: avoid new link failure with -pg · ff1ff7c6
      Jim Meyering 提交于
      Summary:
      * Makefile (COMPILE_WITH_TSAN): Avoid a link failure by disabling
      -pg when building with TSAN enabled.
      Now that "make check" builds all $(PROGRAMS), it is linking
      a few programs that were not normally linked before.
      For example, this would fail to link with the following diagnostic:
      
        COMPILE_WITH_TSAN=1 make -j40 log_and_apply_bench
      
          CCLD     log_and_apply_bench
        ld: /usr/lib/../lib64/gcrt1.o: relocation R_X86_64_32S against `__libc_csu_fini' can not be used when making a shared object; recompile with -fPIC
        /usr/lib/../lib64/gcrt1.o: error adding symbols: Bad value
        collect2: error: ld returned 1 exit status
        Makefile:511: recipe for target 'log_and_apply_bench' failed
        make: *** [log_and_apply_bench] Error 1
      
      Since removing -pg is sufficient to get past this link
      failure, and no one cares about profiling TSAN-enabled
      binaries anyway, we will refrain from linking with -pg
      when TSAN testing is enabled.  Use a new variable, "pg"
      which is set to "-pg" in most cases, but that is made
      empty when COMPILE_WITH_TSAN is set.
      
      Test Plan:
        Now, this succeeds:
      
          rm -f log_and_apply_bench
          COMPILE_WITH_TSAN=1 make -j40 log_and_apply_bench
      
      Reviewers: igor.sugak, rven, sdong, ljin, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D35943
      ff1ff7c6
  20. 25 3月, 2015 2 次提交
  21. 19 3月, 2015 2 次提交
    • I
      rocksdb: fix make unity · 67d99580
      Igor Sugak 提交于
      Summary:
      changed make unity target to use $LIB_SOURCES as a source of library source code. In the old way (using find) table/mock_table.h was added to a list of library objects and this was a course of `make unity` break.
      
      `build_tools/unity` contains some redundant code, I deleted it and moved the functionality in the Makefile.
      
      Test Plan:
      Make sure unity completes with no errors.
      ```lang=bash
      % make unity
      ```
      
      Reviewers: sdong, rven, igor, meyering
      
      Reviewed By: igor, meyering
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D35385
      67d99580
    • S
      A build option to run through all check-in requirements. · 9720ea4d
      sdong 提交于
      Summary: Make it easier for people to run all the tests.
      
      Test Plan: Run it.
      
      Reviewers: rven, yhchiang, igor, MarkCallaghan, IslamAbdelRahman, igor.sugak, anthony, kradhakrishnan, meyering
      
      Reviewed By: meyering
      
      Subscribers: meyering, leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D35319
      9720ea4d
  22. 17 3月, 2015 1 次提交
    • I
      rocksdb: Add gtest · a7aba2ef
      Igor Sugak 提交于
      Summary:
      Adds gtest fused source code into `third-party` directory. No manual changes.
      
      gtest latest released 1.7 has clang dev compilation errors. Trunk version requires only one disabled warning (-Wno-missing-field-initializers)
      
      Fused code is made as described here https://fburl.com/90806322
      Details about why we need gtest source code instead of precompiled library https://fburl.com/90805763
      Source used from http://googletest.googlecode.com/svn/trunk
      
      Test Plan:
      Build and notice no errors. Also check in logs that gtest-all.o being compiled gtest-all.o.
      ```lang=bash
      % USE_CLANG=1 make all
      ```
      
      Reviewers: lgalanis, yufei.zhu, rven, sdong, igor, meyering
      
      Reviewed By: meyering
      
      Subscribers: meyering, yhchiang, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D33345
      a7aba2ef
  23. 14 3月, 2015 1 次提交
    • I
      EventLogger · 52d8347a
      Igor Canadi 提交于
      Summary:
      Here's my proposal for making our LOGs easier to read by machines.
      
      The idea is to dump all events as JSON objects. JSON is easy to read by humans, but more importantly, it's easy to read by machines. That way, we can parse this, load into SQLite/mongo and then query or visualize.
      
      I started with table_create and table_delete events, but if everybody agrees, I'll continue by adding more events (flush/compaction/etc etc)
      
      Test Plan:
      Ran db_bench. Observed:
      2015/01/15-14:13:25.788019 1105ef000 EVENT_LOG_v1 {"time_micros": 1421360005788015, "event": "table_file_creation", "file_number": 12, "file_size": 1909699}
      2015/01/15-14:13:25.956500 110740000 EVENT_LOG_v1 {"time_micros": 1421360005956498, "event": "table_file_deletion", "file_number": 12}
      
      Reviewers: yhchiang, rven, dhruba, MarkCallaghan, lgalanis, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D31647
      52d8347a
  24. 12 3月, 2015 1 次提交
  25. 07 3月, 2015 1 次提交
    • J
      build: fix missing dependency problems · ebc647de
      Jim Meyering 提交于
      Summary:
      Any time one would modify a dependent of any *test*.cc file,
      "make" would fail to rebuild the affected test binaries,
      e.g., db_test.  That was due to the fact that we deliberately
      excluded those test-related files from the definition of SOURCES
      and only $(SOURCES) was used to create the automatically-generated
      .d dependency files.  The fix is to generate a .d file for every
      source file.
      * src.mk: New file.  Defines LIB_SOURCES, MOCK_SOURCES
      and TEST_BENCH_SOURCES.
      * Makefile: Include src.mk.
      Reflect s/SOURCES/LIB_SOURCES/ renaming.
      * build_tools/build_detect_platform: Remove the code
      that was used to generate SOURCES= and MOCK_SOURCES=
      definitions in make_config.mk. Those lists of files
      are now hard-coded in src.mk. Hard-coding this list of
      sources is desirable, because without that, one risks
      including stray .cc files in a build.  Not reproducible.
      
      Test Plan:
      Touch a file used by db_test's dependent .o files and ensure that
      they are all recompiled.  Before, none would be:
      
        $ touch db/db_impl.h && make db_test
          CC       db/db_test.o
          CC       db/column_family.o
          CC       db/db_filesnapshot.o
          CC       db/db_impl.o
          CC       db/db_impl_debug.o
          CC       db/db_impl_readonly.o
          CC       db/forward_iterator.o
          CC       db/internal_stats.o
          CC       db/managed_iterator.o
          CC       db/repair.o
          CC       db/write_batch.o
          CC       utilities/compacted_db/compacted_db_impl.o
          CC       utilities/ttl/db_ttl_impl.o
          CC       util/ldb_cmd.o
          CC       util/ldb_tool.o
          CC       util/sst_dump_tool.o
          CC       util/xfunc.o
          CCLD     db_test
      
      Reviewers: ljin, igor.sugak, igor, rven, sdong
      
      Reviewed By: sdong
      
      Subscribers: yhchiang, adamretter, fyrz, dhruba
      
      Differential Revision: https://reviews.facebook.net/D33849
      ebc647de
  26. 28 2月, 2015 1 次提交
  27. 27 2月, 2015 1 次提交
  28. 25 2月, 2015 1 次提交
  29. 24 2月, 2015 1 次提交
    • I
      rocksdb: changes to support 'make analyze' in Jenkins · 6fdda8ac
      Igor Sugak 提交于
      Summary:
      * Updated Makefile to exit `make analyze` with status 1 if scan-build detected any bugs.
      * scan-build automatically detects which c++ compiler to use, and some times is uses wrong ones (from $CPP). Added implicit parameters to use $CC and $CXX.
      * Added `scan_build_report` directory to .gitignore file.
      * Added `scan_build_report` directory to clean target.
      
      Test Plan:
      Run `make analyze` and verify that exit status is 1, if there are scan-build bugs detected.
      Run `make clean` and verify that files in `scan_build_report` directory are deleted.
      After running `make analyze; git status` and verify that no untracked files in `scan_build_report` directory.
      
      Reviewers: meyering, sdong, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D33831
      6fdda8ac