1. 15 12月, 2016 1 次提交
  2. 14 12月, 2016 10 次提交
  3. 13 12月, 2016 4 次提交
    • I
      Disallow ingesting files into dropped CFs · 2ba59b5a
      Islam AbdelRahman 提交于
      Summary:
      This PR update IngestExternalFile to return an error if we try to ingest a file into a dropped CF.
      
      Right now if IngestExternalFile want to flush a memtable, and it's ingesting a file into a dropped CF, it will wait forever since flushing is not possible for the dropped CF
      Closes https://github.com/facebook/rocksdb/pull/1657
      
      Differential Revision: D4318657
      
      Pulled By: IslamAbdelRahman
      
      fbshipit-source-id: ed6ea2b
      2ba59b5a
    • D
      cast to signed char in ldb_cmd_test for ppc64le · 1f6f7e3e
      Daniel Black 提交于
      Summary:
      char is unsigned on power by default causing this test to fail with the FF case. ppc64 return 255 while x86 returned -1. Casting works on both platforms.
      Closes https://github.com/facebook/rocksdb/pull/1500
      
      Differential Revision: D4308775
      
      Pulled By: yiwu-arbug
      
      fbshipit-source-id: db3e6e0
      1f6f7e3e
    • A
      More accurate error status for BackupEngine::Open · 243975d5
      Andrew Kryczka 提交于
      Summary:
      Some users are assuming NotFound means the backup does not
      exist at the provided path, which is a reasonable assumption. We need to
      stop returning NotFound for system errors.
      
      Depends on #1644
      Closes https://github.com/facebook/rocksdb/pull/1645
      
      Differential Revision: D4312233
      
      Pulled By: ajkr
      
      fbshipit-source-id: 5343c10
      243975d5
    • A
      Return finer-granularity status from Env::GetChildren* · f0c509e2
      Andrew Kryczka 提交于
      Summary:
      It'd be nice to use the error status type to distinguish
      between user error and system error. For example, GetChildren can fail
      listing a backup directory's contents either because a bad path was provided
      (user error) or because an operation failed, e.g., a remote storage service
      call failed (system error). In the former case, we want to continue and treat
      the backup directory as empty; in the latter case, we want to immediately
      propagate the error to the caller.
      
      This diff uses NotFound to indicate user error and IOError to indicate
      system error. Previously IOError indicated both.
      Closes https://github.com/facebook/rocksdb/pull/1644
      
      Differential Revision: D4312157
      
      Pulled By: ajkr
      
      fbshipit-source-id: 51b4f24
      f0c509e2
  4. 10 12月, 2016 4 次提交
    • A
      Add db_bench option for stderr logging · dc64f46b
      Andrew Kryczka 提交于
      Summary:
      The info log file ("LOG") is stored in the db directory by default. When the db is on a distributed env, this is unnecessarily slow. So, I added an option to db_bench to just print the info log messages to stderr.
      Closes https://github.com/facebook/rocksdb/pull/1641
      
      Differential Revision: D4309348
      
      Pulled By: ajkr
      
      fbshipit-source-id: 1e6f851
      dc64f46b
    • J
      Increase buffer size · 2cabdb8f
      Jonathan Lee 提交于
      Summary:
      When compiling with GCC>=7.0.0, "db/internal_stats.cc" fails to compile as the data being written to the buffer potentially exceeds its size.
      
      This fix simply doubles the size of the buffer, thus accommodating the max possible data size.
      Closes https://github.com/facebook/rocksdb/pull/1635
      
      Differential Revision: D4302162
      
      Pulled By: yiwu-arbug
      
      fbshipit-source-id: c76ad59
      2cabdb8f
    • J
      Remove unnecessary header include · 4a17b47b
      Jonathan Lee 提交于
      Summary:
      Remove "util/testharness.h" from list of includes for "db/db_filesnapshot.cc", as it wasn't being used and thus caused an extraneous dependency on gtest.
      Closes https://github.com/facebook/rocksdb/pull/1634
      
      Differential Revision: D4302146
      
      Pulled By: yiwu-arbug
      
      fbshipit-source-id: e900c0b
      4a17b47b
    • M
      Fixed a crash in debug build in flush_job.cc · 8c2b921f
      Mike Kolupaev 提交于
      Summary:
      It was doing `&range_del_iters[0]` on an empty vector. Even though the resulting pointer is never dereferenced, it's still bad for two reasons:
      * the practical reason: it crashes with `std::out_of_range` exception in our debug build,
      * the "C++ standard lawyer" reason: it's undefined behavior because, in `std::vector` implementation, it probably "dereferences" a null pointer, which is invalid even though it doesn't actually read the pointed memory, just converts a pointer into a reference (and then flush_job.cc converts it back to pointer); nullptr references are undefined behavior.
      Closes https://github.com/facebook/rocksdb/pull/1612
      
      Differential Revision: D4265625
      
      Pulled By: al13n321
      
      fbshipit-source-id: db26fb9
      8c2b921f
  5. 09 12月, 2016 2 次提交
  6. 08 12月, 2016 7 次提交
  7. 07 12月, 2016 3 次提交
  8. 06 12月, 2016 6 次提交
    • M
      Implement non-exclusive locks · 2005c88a
      Manuel Ung 提交于
      Summary:
      This is an implementation of non-exclusive locks for pessimistic transactions. It is relatively simple and does not prevent starvation (ie. it's possible that request for exclusive access will never be granted if there are always threads holding shared access). It is done by changing `KeyLockInfo` to hold an set a transaction ids, instead of just one, and adding a flag specifying whether this lock is currently held with exclusive access or not.
      
      Some implementation notes:
      - Some lock diagnostic functions had to be updated to return a set of transaction ids for a given lock, eg. `GetWaitingTxn` and `GetLockStatusData`.
      - Deadlock detection is a bit more complicated since a transaction can now wait on multiple other transactions. A BFS is done in this case, and deadlock detection depth is now just a limit on the number of transactions we visit.
      - Expirable transactions do not work efficiently with shared locks at the moment, but that's okay for now.
      Closes https://github.com/facebook/rocksdb/pull/1573
      
      Differential Revision: D4239097
      
      Pulled By: lth
      
      fbshipit-source-id: da7c074
      2005c88a
    • Y
      Mention IngestExternalFile changes in HISTORY.md · 0b0f2357
      Yi Wu 提交于
      Summary:
      I hit the land button too fast and didn't include the line.
      Closes https://github.com/facebook/rocksdb/pull/1622
      
      Differential Revision: D4281316
      
      Pulled By: yiwu-arbug
      
      fbshipit-source-id: c7b38e0
      0b0f2357
    • Y
      Update HISTORY.md for 5.0 branch · 23db48e8
      Yi Wu 提交于
      Summary:
      These changes are included in the new branch-cut.
      Closes https://github.com/facebook/rocksdb/pull/1621
      
      Differential Revision: D4281015
      
      Pulled By: yiwu-arbug
      
      fbshipit-source-id: d88858b
      23db48e8
    • M
      Fixed CompactionFilter::Decision::kRemoveAndSkipUntil · beb36d9c
      Mike Kolupaev 提交于
      Summary:
      Embarassingly enough, the first time I tried to use my new feature in logdevice it crashed with this assertion failure:
      
        db/pinned_iterators_manager.h:30: void rocksdb::PinnedIteratorsManager::StartPinning(): Assertion `pinning_enabled == false' failed
      
      The issue was that `pinned_iters_mgr_.StartPinning()` was called but `pinned_iters_mgr_.ReleasePinnedData()` wasn't.
      Closes https://github.com/facebook/rocksdb/pull/1611
      
      Differential Revision: D4265622
      
      Pulled By: al13n321
      
      fbshipit-source-id: 747b10f
      beb36d9c
    • I
      Allow user to specify a CF for SST files generated by SstFileWriter · 67f37cf1
      Islam AbdelRahman 提交于
      Summary:
      Allow user to explicitly specify that the generated file by SstFileWriter will be ingested in a specific CF.
      This allow us to persist the CF id in the generated file
      Closes https://github.com/facebook/rocksdb/pull/1615
      
      Differential Revision: D4270422
      
      Pulled By: IslamAbdelRahman
      
      fbshipit-source-id: 7fb954e
      67f37cf1
    • A
      Made delete_obsolete_files_period_micros option dynamic · 9053fe2a
      Anton Safonov 提交于
      Summary:
      Made delete_obsolete_files_period_micros option dynamic. It can be updating using DB::SetDBOptions().
      Closes https://github.com/facebook/rocksdb/pull/1595
      
      Differential Revision: D4246569
      
      Pulled By: tonek
      
      fbshipit-source-id: d23f560
      9053fe2a
  9. 02 12月, 2016 3 次提交
    • I
      fix clang build · edde954e
      Islam AbdelRahman 提交于
      Summary:
      override is missing for FilterV2
      Closes https://github.com/facebook/rocksdb/pull/1606
      
      Differential Revision: D4263832
      
      Pulled By: IslamAbdelRahman
      
      fbshipit-source-id: d8b337a
      edde954e
    • Y
      Add memtable_insert_with_hint_prefix_size option to db_bench · 56281f3a
      Yi Wu 提交于
      Summary:
      Add memtable_insert_with_hint_prefix_size option to db_bench
      Closes https://github.com/facebook/rocksdb/pull/1604
      
      Differential Revision: D4260549
      
      Pulled By: yiwu-arbug
      
      fbshipit-source-id: cee5ef7
      56281f3a
    • I
      Cache heap::downheap() root comparison (optimize heap cmp call) · 4a21b140
      Islam AbdelRahman 提交于
      Summary:
      Reduce number of comparisons in heap by caching which child node in the first level is smallest (left_child or right_child)
      So next time we can compare directly against the smallest child
      
      I see that the total number of calls to comparator drops significantly when using this optimization
      
      Before caching (~2mil key comparison for iterating the DB)
      ```
      $ DEBUG_LEVEL=0 make db_bench -j64 && ./db_bench --benchmarks="readseq" --db="/dev/shm/heap_opt" --use_existing_db --disable_auto_compactions --cache_size=1000000000  --perf_level=2
      readseq      :       0.338 micros/op 2959201 ops/sec;  327.4 MB/s user_key_comparison_count = 2000008
      ```
      After caching (~1mil key comparison for iterating the DB)
      ```
      $ DEBUG_LEVEL=0 make db_bench -j64 && ./db_bench --benchmarks="readseq" --db="/dev/shm/heap_opt" --use_existing_db --disable_auto_compactions --cache_size=1000000000 --perf_level=2
      readseq      :       0.309 micros/op 3236801 ops/sec;  358.1 MB/s user_key_comparison_count = 1000011
      ```
      
      It also improves
      Closes https://github.com/facebook/rocksdb/pull/1600
      
      Differential Revision: D4256027
      
      Pulled By: IslamAbdelRahman
      
      fbshipit-source-id: 76fcc66
      4a21b140