1. 09 7月, 2014 1 次提交
    • L
      integrate rate limiter into rocksdb · 534357ca
      Lei Jin 提交于
      Summary:
      Add option and plugin rate limiter for PosixWritableFile. The rate
      limiter only applies to flush and compaction. WAL and MANIFEST are
      excluded from this enforcement.
      
      Test Plan: db_test
      
      Reviewers: igor, yhchiang, sdong
      
      Reviewed By: sdong
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D19425
      534357ca
  2. 04 7月, 2014 1 次提交
  3. 02 7月, 2014 1 次提交
  4. 30 5月, 2014 1 次提交
  5. 22 5月, 2014 1 次提交
  6. 20 5月, 2014 2 次提交
    • S
      Print out thread ID while thread terminates for decreased pool size. · bd1105aa
      sdong 提交于
      Summary: Per request from @nkg-, temporarily print thread ID when a thread terminates. It is a temp solution as we try to minimized stderr messages.
      
      Test Plan: env_test
      
      Reviewers: haobo, igor, dhruba
      
      Reviewed By: igor
      
      CC: nkg-, leveldb
      
      Differential Revision: https://reviews.facebook.net/D18753
      bd1105aa
    • S
      ThreadPool to allow decrease number of threads and increase of number of... · 3df07d17
      sdong 提交于
      ThreadPool to allow decrease number of threads and increase of number of threads is to be instantly scheduled
      
      Summary:
      Add a feature to decrease the number of threads in thread pool.
      Also instantly schedule more threads if number of threads is increased.
      
      Here is the way it is implemented: each background thread needs its thread ID. After decreasing number of threads, all threads are woken up. The thread with the largest thread ID will terminate. If there are more threads to terminate, the thread will wake up all threads again.
      
      Another change is made so that when number of threads is increased, more threads are created and all previous excessive threads are woken up to do the work.
      
      Test Plan: Add a unit test.
      
      Reviewers: haobo, dhruba
      
      Reviewed By: haobo
      
      CC: yhchiang, igor, nkg-, leveldb
      
      Differential Revision: https://reviews.facebook.net/D18675
      3df07d17
  7. 29 4月, 2014 1 次提交
    • I
      Fix TransactionLogIterator EOF caching · 72ff275e
      Igor Canadi 提交于
      Summary:
      When TransactionLogIterator comes to EOF, it calls UnmarkEOF and continues reading. However, if glibc cached the EOF status of the file, it will get EOF again, even though the new data might have been written to it.
      
      This has been causing errors in Mac OS.
      
      Test Plan: test passes, was failing before
      
      Reviewers: dhruba, haobo, sdong
      
      Reviewed By: haobo
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D18381
      72ff275e
  8. 22 4月, 2014 1 次提交
    • I
      Flush before Fsync()/Sync() · c2da9e59
      Igor Canadi 提交于
      Summary: Calling Fsync()/Sync() on a file should give the guarantee that whatever you written to the file is now persisted. This is currently not the case, since we might have some data left in application cache as we do Fsync()/Sync(). For example, BuildTable() calls Fsync() without the flush, assuming all sst data is now persisted, but it's actually not. This may result in big inconsistencies.
      
      Test Plan: no test
      
      Reviewers: sdong, dhruba, haobo, ljin, yhchiang
      
      Reviewed By: sdong
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D18159
      c2da9e59
  9. 02 4月, 2014 1 次提交
  10. 01 4月, 2014 1 次提交
    • I
      Retry FS system calls on EINTR · 726c8084
      Igor Canadi 提交于
      Summary: EINTR means 'please retry'. We don't do that currenty. We should.
      
      Test Plan: make check, although it doesn't really test the new code. we'll just have to believe in the code!
      
      Reviewers: haobo, ljin
      
      Reviewed By: haobo
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D17349
      726c8084
  11. 29 3月, 2014 1 次提交
  12. 26 3月, 2014 1 次提交
  13. 20 3月, 2014 1 次提交
  14. 18 3月, 2014 1 次提交
    • I
      Optimize fallocation · f26cb0f0
      Igor Canadi 提交于
      Summary:
      Based on my recent findings (posted in our internal group), if we use fallocate without KEEP_SIZE flag, we get superior performance of fdatasync() in append-only workloads.
      
      This diff provides an option for user to not use KEEP_SIZE flag, thus optimizing his sync performance by up to 2x-3x.
      
      At one point we also just called posix_fallocate instead of fallocate, which isn't very fast: http://code.woboq.org/userspace/glibc/sysdeps/posix/posix_fallocate.c.html (tl;dr it manually writes out zero bytes to allocate storage). This diff also fixes that, by first calling fallocate and then posix_fallocate if fallocate is not supported.
      
      Test Plan: make check
      
      Reviewers: dhruba, sdong, haobo, ljin
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D16761
      f26cb0f0
  15. 12 3月, 2014 1 次提交
  16. 08 3月, 2014 1 次提交
  17. 07 3月, 2014 1 次提交
  18. 26 2月, 2014 1 次提交
    • L
      thread local pointer storage · b2795b79
      Lei Jin 提交于
      Summary:
      This is not a generic thread local implementation in the sense that it
      only takes pointer. But it does support multiple instances per thread
      and lets user plugin function to perform cleanup when thread exits or an
      instance gets destroyed.
      
      Test Plan: unit test for now
      
      Reviewers: haobo, igor, sdong, dhruba
      
      Reviewed By: igor
      
      CC: leveldb, kailiu
      
      Differential Revision: https://reviews.facebook.net/D16131
      b2795b79
  19. 07 2月, 2014 1 次提交
  20. 28 1月, 2014 1 次提交
    • I
      Fsync directory after we create a new file · 832158e7
      Igor Canadi 提交于
      Summary:
      @dhruba, I'm not sure where we need to sync the directory. I implemented the function in Env() and added the dir sync just after we close the newly created file in the builder.
      
      Should I also add FsyncDir() to new files that get created by a compaction?
      
      Test Plan: Confirmed that FsyncDir is returning Status::OK()
      
      Reviewers: dhruba, haobo
      
      Reviewed By: dhruba
      
      CC: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D14751
      832158e7
  21. 08 1月, 2014 1 次提交
    • M
      Eliminate stdout message when launching a posix thread. · 4c75e21c
      Mike Lin 提交于
      This seems out of place as it's the only time RocksDB prints to stdout in the
      normal course of operations. Thread IDs can still be retrieved from the LOG
      file: cut -d ' ' -f2 LOG | sort | uniq | egrep -x '[0-9a-f]+'
      4c75e21c
  22. 12 12月, 2013 1 次提交
  23. 11 12月, 2013 1 次提交
  24. 05 12月, 2013 1 次提交
  25. 02 12月, 2013 1 次提交
    • L
      Fix build without glibc · 45a2f2d8
      lovro 提交于
      Summary: The preprocessor does not follow normal rules of && evaluation, tries to evaluate __GLIBC_PREREQ(2, 12) even though the defined() check fails.  This breaks the build if __GLIBC_PREREQ is absent.
      
      Test Plan: Try adding #undef __GLIBC_PREREQ above the offending line, build no longer breaks
      
      Reviewed By: igor
      
      Blame Rev: 4c813836
      45a2f2d8
  26. 28 11月, 2013 1 次提交
  27. 27 11月, 2013 1 次提交
  28. 21 11月, 2013 1 次提交
    • S
      A Simple Plain Table · b59d4d5a
      Siying Dong 提交于
      Summary:
      A Simple plain table format. No block structure. When creating the table reader, scanning the full table to create indexes.
      
      Test Plan:Add unit test
      
      Reviewers:haobo,dhruba,kailiu
      
      CC:
      
      Task ID: #
      
      Blame Rev:
      b59d4d5a
  29. 17 11月, 2013 1 次提交
  30. 02 11月, 2013 1 次提交
    • D
      Implement a compressed block cache. · b4ad5e89
      Dhruba Borthakur 提交于
      Summary:
      Rocksdb can now support a uncompressed block cache, or a compressed
      block cache or both. Lookups first look for a block in the
      uncompressed cache, if it is not found only then it is looked up
      in the compressed cache. If it is found in the compressed cache,
      then it is uncompressed and inserted into the uncompressed cache.
      
      It is possible that the same block resides in the compressed cache
      as well as the uncompressed cache at the same time. Both caches
      have their own individual LRU policy.
      
      Test Plan: Unit test case attached.
      
      Reviewers: kailiu, sdong, haobo, leveldb
      
      Reviewed By: haobo
      
      CC: xjin, haobo
      
      Differential Revision: https://reviews.facebook.net/D12675
      b4ad5e89
  31. 01 11月, 2013 1 次提交
  32. 23 10月, 2013 1 次提交
    • M
      Dbid feature · 9b50106f
      Mayank Agarwal 提交于
      Summary:
      Create a new type of file on startup if it doesn't already exist called DBID.
      This will store a unique number generated from boost library's uuid header file.
      The use-case is to identify the case of a db losing all its data and coming back up either empty or from an image(backup/live replica's recovery)
      the key point to note is that DBID is not stored in a backup or db snapshot
      It's preferable to use Boost for uuid because:
      1) A non-standard way of generating uuid is not good
      2) /proc/sys/kernel/random/uuid generates a uuid but only on linux environments and the solution would not be clean
      3) c++ doesn't have any direct way to get a uuid
      4) Boost is a very good library that was already having linkage in rocksdb from third-party
      Note: I had to update the TOOLCHAIN_REV in build files to get latest verison of boost from third-party as the older version had a bug.
      I had to put Wno-uninitialized in Makefile because boost-1.51 has an unitialized variable and rocksdb would not comiple otherwise. Latet open-source for boost is 1.54 but is not there in third-party. I have notified the concerned people in fbcode about it.
      @kailiu : While releasing to third-party, an additional dependency will need to be created for boost in TARGETS file. I can help identify.
      
      Test Plan:
      Expand db_test to test 2 cases
      1) Restarting db with Id file present - verify that no change to Id
      2)Restarting db with Id file deleted - verify that a different Id is there after reopen
      Also run make all check
      
      Reviewers: dhruba, haobo, kailiu, sdong
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D13587
      9b50106f
  33. 17 10月, 2013 1 次提交
  34. 10 10月, 2013 1 次提交
    • I
      Env class that can randomly read and write · d0beadd4
      Igor Canadi 提交于
      Summary: I have implemented basic simple use case that I need for External Value Store I'm working on. There is a potential for making this prettier by refactoring/combining WritableFile and RandomAccessFile, avoiding some copypasta. However, I decided to implement just the basic functionality, so I can continue working on the other diff.
      
      Test Plan: Added a unittest
      
      Reviewers: dhruba, haobo, kailiu
      
      Reviewed By: haobo
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D13365
      d0beadd4
  35. 06 10月, 2013 1 次提交
  36. 05 10月, 2013 1 次提交
  37. 24 9月, 2013 1 次提交
  38. 16 9月, 2013 2 次提交