1. 21 2月, 2020 1 次提交
    • S
      Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) · fdf882de
      sdong 提交于
      Summary:
      When dynamically linking two binaries together, different builds of RocksDB from two sources might cause errors. To provide a tool for user to solve the problem, the RocksDB namespace is changed to a flag which can be overridden in build time.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6433
      
      Test Plan: Build release, all and jtest. Try to build with ROCKSDB_NAMESPACE with another flag.
      
      Differential Revision: D19977691
      
      fbshipit-source-id: aa7f2d0972e1c31d75339ac48478f34f6cfcfb3e
      fdf882de
  2. 06 3月, 2018 1 次提交
  3. 23 2月, 2018 2 次提交
  4. 12 1月, 2018 1 次提交
  5. 22 7月, 2017 2 次提交
  6. 16 7月, 2017 1 次提交
  7. 28 4月, 2017 1 次提交
  8. 22 4月, 2017 1 次提交
  9. 21 12月, 2016 1 次提交
  10. 06 6月, 2016 1 次提交
  11. 23 4月, 2016 1 次提交
    • D
      Alpine Linux Build (#990) · b71c4e61
      dx9 提交于
      * Musl libc does not provide adaptive mutex. Added feature test for PTHREAD_MUTEX_ADAPTIVE_NP.
      
      * Musl libc does not provide backtrace(3). Added a feature check for backtrace(3).
      
      * Fixed compiler error.
      
      * Musl libc does not implement backtrace(3). Added platform check for libexecinfo.
      
      * Alpine does not appear to support gcc -pg option. By default (gcc has PIE option enabled) it fails with:
      
      gcc: error: -pie and -pg|p|profile are incompatible when linking
      
      When -fno-PIE and -nopie are used it fails with:
      
      /usr/lib/gcc/x86_64-alpine-linux-musl/5.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find gcrt1.o: No such file or directory
      
      Added gcc -pg platform test and output PROFILING_FLAGS accordingly. Replaced pg var in Makefile with PROFILING_FLAGS.
      
      * fix segfault when TEST_IOCTL_FRIENDLY_TMPDIR is undefined and default candidates are not suitable
      
      * use ASSERT_DOUBLE_EQ instead of ASSERT_EQ
      
      * When compiled with ROCKSDB_MALLOC_USABLE_SIZE UniversalCompactionFourPaths and UniversalCompactionSecondPathRatio tests fail due to premature memtable flushes on systems with 16-byte alignment. Arena runs out of block space before GenerateNewFile() completes.
      
      Increased options.write_buffer_size.
      b71c4e61
  12. 10 2月, 2016 1 次提交
  13. 24 4月, 2015 1 次提交
    • S
      Build for CYGWIN · 98a44559
      sdong 提交于
      Summary:
      Make it build for CYGWIN.
      Need to define "-std=gnu++11" instead of "-std=c++11" and use some replacement functions.
      
      Test Plan: Build it and run some unit tests in CYGWIN
      
      Reviewers: yhchiang, rven, anthony, kradhakrishnan, igor
      
      Reviewed By: igor
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D37605
      98a44559
  14. 17 3月, 2015 1 次提交
  15. 05 2月, 2015 1 次提交
  16. 07 11月, 2014 1 次提交
    • I
      Turn off -Wshadow · 5fd33d26
      Igor Canadi 提交于
      Summary:
      So glibc is not -Wshadow-safe, so we need to turn it off :(
      
            error: ‘int sigaction(int, const sigaction*, sigaction*)’ hides
            constructor for ‘struct sigaction’
      
      The rest of the changes in this diff is that we include .h files under rocksdb namespace, which is a no-no.
      
      Test Plan: compiles now
      
      Reviewers: ljin, yhchiang, rven, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D28413
      5fd33d26
  17. 29 10月, 2014 1 次提交
    • I
      FlushProcess · a39e931e
      Igor Canadi 提交于
      Summary:
      Abstract out FlushProcess and take it out of DBImpl.
      This also includes taking DeletionState outside of DBImpl.
      
      Currently this diff is only doing the refactoring. Future work includes:
      1. Decoupling flush_process.cc, make it depend on less state
      2. Write flush_process_test, which will mock out everything that FlushProcess depends on and test it in isolation
      
      Test Plan: make check
      
      Reviewers: rven, yhchiang, sdong, ljin
      
      Reviewed By: ljin
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D27561
      a39e931e
  18. 06 9月, 2014 1 次提交
  19. 25 4月, 2014 2 次提交
    • I
      Better stack trace in MAC · 46b3076c
      Igor Canadi 提交于
      Summary:
      Now this gives us the real deal stack trace:
      
          Assertion failed: (false), function GetProperty, file db/db_impl.cc, line 4072.
          Received signal 6 (Abort trap: 6)
          #0   0x7fff57ce39b9
          #1   abort (in libsystem_c.dylib) + 125
          #2   basename (in libsystem_c.dylib) + 0
          #3   rocksdb::DBImpl::GetProperty(rocksdb::ColumnFamilyHandle*, rocksdb::Slice const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*) (in db_test) (db_impl.cc:4072)
          #4   rocksdb::_Test_Empty::_Run() (in db_test) (testharness.h:68)
          #5   rocksdb::_Test_Empty::_RunIt() (in db_test) (db_test.cc:1005)
          #6   rocksdb::test::RunAllTests() (in db_test) (testharness.cc:60)
          #7   main (in db_test) (db_test.cc:6697)
          #8   start (in libdyld.dylib) + 1
      
      Test Plan: added artificial assert, saw great stack trace
      
      Reviewers: haobo, dhruba, ljin
      
      Reviewed By: haobo
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D18309
      46b3076c
    • I
      Install stack trace handlers in unit tests · fc3127e8
      Igor Canadi 提交于
      Summary: Sometimes, our tests fail because of normal `assert` call. It would be helpful to see stack trace in that case, too.
      
      Test Plan: Added `assert(false)` and verified it prints out stack trace
      
      Reviewers: haobo, dhruba, sdong, ljin, yhchiang
      
      Reviewed By: haobo
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D18291
      fc3127e8
  20. 23 4月, 2014 1 次提交
    • I
      Print out stack trace in mac, too · f9f8965e
      Igor Canadi 提交于
      Summary: While debugging Mac-only issue with ThreadLocalPtr, this was very useful. Let's print out stack trace in MAC OS, too.
      
      Test Plan: Verified that somewhat useful stack trace was generated on mac. Will run PrintStack() on linux, too.
      
      Reviewers: ljin, haobo
      
      Reviewed By: haobo
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D18189
      f9f8965e
  21. 07 12月, 2013 1 次提交
    • I
      Print stack trace on assertion failure · 9644e0e0
      Igor Canadi 提交于
      Summary:
      This will help me a lot! When we hit an assertion in unittest, we get the whole stack trace now.
      
      Also, changed stack trace a bit, we now include actual demangled C++ class::function symbols!
      
      Test Plan: Added ASSERT_TRUE(false) to a test, observed a stack trace
      
      Reviewers: haobo, dhruba, kailiu
      
      Reviewed By: kailiu
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D14499
      9644e0e0
  22. 17 10月, 2013 1 次提交
  23. 05 10月, 2013 1 次提交
  24. 23 4月, 2013 1 次提交
    • H
      [RocksDB] Print stack trace to stderr instead of stdio. · 06d3487b
      Haobo Xu 提交于
      Summary: Some scripts (like regression_build_test.sh) redirect stdio to a tmp file and delete it on exit. This would miss the stack trace output on segfault. Output to stderr would hopefully show us the stack trace in the continuous build output.
      
      Test Plan: ./signal_test, make check
      
      Reviewers: dhruba
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D10485
      06d3487b
  25. 21 4月, 2013 1 次提交
    • H
      [RocksDB] Add stacktrace signal handler · 1255dcd4
      Haobo Xu 提交于
      Summary:
      This diff provides the ability to print out a stacktrace when the process receives certain signals.
      Currently, we enable this for the following signals (program error related):
      SIGILL SIGSEGV SIGBUS SIGABRT
      Application simply #include "util/stack_trace.h" and call leveldb::InstallStackTraceHandler() during initialization, if signal handler is needed. It's not done automatically when openning db, because it's the application(process)'s responsibility to install signal handler and some applications might already have their own (like fbcode).
      
      Sample output:
      Received signal 11 (Segmentation fault)
      #0  0x408ff0 ./signal_test() [0x408ff0] /home/haobo/rocksdb/util/signal_test.cc:4
      #1  0x40827d ./signal_test() [0x40827d] /home/haobo/rocksdb/util/signal_test.cc:24
      #2  0x7f8bb183172e /usr/local/fbcode/gcc-4.7.1-glibc-2.14.1/lib/libc.so.6(__libc_start_main+0x10e) [0x7f8bb183172e] ??:0
      #3  0x408ebc ./signal_test() [0x408ebc] /home/engshare/third-party/src/glibc/glibc-2.14.1/glibc-2.14.1/csu/../sysdeps/x86_64/elf/start.S:113
      Segmentation fault (core dumped)
      
      For each frame, we print the raw pointer, the symbol provided by backtrace_symbols (still not good enough), and the source file/line. Note that address translation is done by directly shell out to addr2line. ??:0 means addr2line fails to do the translation. Hacky, but I think it's good for now.
      
      Test Plan: signal_test.cc
      
      Reviewers: dhruba, MarkCallaghan
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D10173
      1255dcd4