1. 08 10月, 2016 3 次提交
    • A
      [RocksJava] Adjusted RateLimiter to 3.10.0 (#1368) · 5cd28833
      Adam Retter 提交于
      Summary:
      - Deprecated RateLimiterConfig and GenericRateLimiterConfig
      - Introduced RateLimiter
      
      It is now possible to use all C++ related methods also in RocksJava.
      A noteable method is setBytesPerSecond which can change the allowed
      number of bytes per second at runtime.
      
      Test Plan:
      make rocksdbjava
      make jtest
      
      Reviewers: adamretter, yhchiang, ankgup87
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D35715
      5cd28833
    • R
      Expose Transaction State Publicly · 37737c3a
      Reid Horuff 提交于
      Summary:
      This exposes a transactions state through a public api rather than through a public member variable. I also do some name refactoring.
      ExecutionStatus => TransactionState
      exec_status_ => trx_state_
      
      Test Plan: It compiles and transaction_test passes.
      
      Reviewers: IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: andrewkr, mung, dhruba, sdong
      
      Differential Revision: https://reviews.facebook.net/D64689
      37737c3a
    • R
      Add facility to write only a portion of WriteBatch to WAL · 2c1f9529
      Reid Horuff 提交于
      Summary:
      When constructing a write batch a client may now call MarkWalTerminationPoint() on that batch. No batch operations after this call will be added written to the WAL but will still be inserted into the Memtable. This facility is used to remove one of the three WriteImpl calls in 2PC transactions. This produces a ~1% perf improvement.
      
      ```
      RocksDB - unoptimized 2pc, sync_binlog=1, disable_2pc=off
      INFO 2016-08-31 14:30:38,814 [main]: REQUEST PHASE COMPLETED. 75000000 requests done in 2619 seconds. Requests/second = 28628
      
      RocksDB - optimized 2pc , sync_binlog=1, disable_2pc=off
      INFO 2016-08-31 16:26:59,442 [main]: REQUEST PHASE COMPLETED. 75000000 requests done in 2581 seconds. Requests/second = 29054
      ```
      
      Test Plan: Two unit tests added.
      
      Reviewers: sdong, yiwu, IslamAbdelRahman
      
      Reviewed By: yiwu
      
      Subscribers: hermanlee4, dhruba, andrewkr
      
      Differential Revision: https://reviews.facebook.net/D64599
      2c1f9529
  2. 07 10月, 2016 3 次提交
    • P
      Fix record_size in log_write_bench, swap args to std::string::assign. (#1373) · 043cb62d
      Peter (Stig) Edwards 提交于
      Hello and thank you for RocksDB,
       
      I noticed when using log_write_bench that writes were always 88 bytes:
       
      > strace -e trace=write ./log_write_bench -num_records 2 2>&1 | head -n 2
      write(3, "\371\371\371\371\371\371\371\371\371\371\371\371\371\371\371\371\371\371\371\371\371\371\371\371\371\371\371\371\371\371\371\371"..., 88) = 88
      write(3, "\371\371\371\371\371\371\371\371\371\371\371\371\371\371\371\371\371\371\371\371\371\371\371\371\371\371\371\371\371\371\371\371"..., 88) = 88
      
      > strace -e trace=write ./log_write_bench -record_size 4096 -num_records 2 2>&1 | head -n 2
      write(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 88) = 88
      write(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 88) = 88
       
      I think this should be:
      
      <<    record.assign('X', FLAGS_record_size);
      >>    record.assign(FLAGS_record_size, 'X');
      
      So fill and not buffer. Otherwise I always see writes of size 88 (the decimal value for chr "X").
      
      string& assign (const char* s, size_t n);
      buffer - Copies the first n characters from the array of characters pointed by s.
      
      string& assign (size_t n, char c);
      fill   - Replaces the current value by n consecutive copies of character c.
      
      perl -le 'print ord "X"'
      88
       
      With the change:
       
      > strace -e trace=write ./log_write_bench -record_size 4096 -num_records 2 2>&1 | head -n 2
      write(3, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"..., 4096) = 4096
      write(3, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"..., 4096) = 4096
       
      > strace -e trace=write ./log_write_bench -num_records 2 2>&1 | head -n 2
      write(3, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"..., 249) = 249
      write(3, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"..., 249) = 249
      
      Thanks.
      
      https://github.com/facebook/rocksdb/commit/01c27be5fb42524c5052b4b4a23e05501e1d1421
      https://reviews.facebook.net/D16239
      043cb62d
    • S
      env_mirror: fix a few leaks (#1363) · 4985f60f
      Sage Weil 提交于
      * env_mirror: fix leak from LockFile
      Signed-off-by: NSage Weil <sage@redhat.com>
      
      * env_mirror: instruct EnvMirror whether mirrored Envs should be destroyed
      
      The lifecycle rules for Env are frustrating and undocumented.  Notably,
      Env::Default() should *not* be freed, but any Env instances we created
      should be.
      
      Explicitly instruct EnvMirror whether to clean up child Env instances.
      Default to false so that we do not affect existing callers.
      Signed-off-by: NSage Weil <sage@redhat.com>
      4985f60f
    • I
      update of c.h (#1371) · 5aded67d
      Igor Mihalik 提交于
      Added rocksdb_options_set_memtable_prefix_bloom_size_ratio function implemented in c.cc but not exported via c.h
      5aded67d
  3. 06 10月, 2016 1 次提交
  4. 05 10月, 2016 11 次提交
  5. 04 10月, 2016 4 次提交
    • I
      Fix Mac build · 9d6c9613
      Islam AbdelRahman 提交于
      9d6c9613
    • I
      Support SST files with Global sequence numbers · ab01da54
      Islam AbdelRahman 提交于
      Summary:
      - Update SstFileWriter to include a property for a global sequence number in the SST file `rocksdb.external_sst_file.global_seqno`
      - Update TableProperties to be aware of the offset of each property in the file
      - Update BlockBasedTableReader and Block to be able to honor the sequence number in `rocksdb.external_sst_file.global_seqno` property and use it to overwrite all sequence number in the file
      
      Something worth mentioning is that we don't update the seqno in the index block since and when doing a binary search, the reason for that is that it's guaranteed that SST files with global seqno will have only one user_key and each key will have seqno=0 encoded in it, This mean that this key is greater than any other key with seqno> 0. That mean that we can actually keep the current logic for these blocks
      
      Test Plan: unit tests
      
      Reviewers: andrewkr, yhchiang, yiwu, sdong
      
      Reviewed By: sdong
      
      Subscribers: hcz, andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D62523
      ab01da54
    • A
      Minor fixes around Windows 64 Java Artifacts (#1366) · d346ba24
      Adam Retter 提交于
      d346ba24
    • K
      Add factory method for creating persistent cache that is accessible from public · e91b4d0c
      krad 提交于
      Summary:
      Currently there is no mechanism to create persistent cache from
      headers. Adding a simple factory method to create a simple persistent cache with
      default or NVM optimized settings.
      
      note: Any idea to test this factory is appreciated.
      
      Test Plan: None
      
      Reviewers: sdong
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D64527
      e91b4d0c
  6. 01 10月, 2016 2 次提交
    • M
      Expose transaction id, lock state information and transaction wait information · be1f1092
      Manuel Ung 提交于
      Summary:
      This diff does 3 things:
      
      Expose TransactionID so that we can identify transactions when we retrieve locking and lock wait information. This is exposed as `Transaction::GetID`.
      
      Expose lock state information by locking all stripes in all column families and copying their contents to a data structure. This is exposed as `TransactionDB::GetLockStatusData`.
      
      Adds support for tracking the transaction and the key being waited on, and exposes this as `Transaction::GetWaitingTxn`.
      
      Test Plan: unit tests
      
      Reviewers: horuff, sdong
      
      Reviewed By: sdong
      
      Subscribers: vasilep, hermanlee4, andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D64413
      be1f1092
    • A
      Store range tombstones in memtable · 6009c473
      Andrew Kryczka 提交于
      Summary:
      - Store range tombstones in a separate MemTableRep instantiated with ColumnFamilyOptions::memtable_factory
      - MemTable::NewRangeTombstoneIterator() returns a MemTableIterator over the separate MemTableRep
      - Part of the read path is not implemented yet (i.e., MemTable::Get())
      
      Test Plan: see unit tests
      
      Reviewers: wanning
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D62217
      6009c473
  7. 30 9月, 2016 4 次提交
  8. 29 9月, 2016 7 次提交
  9. 28 9月, 2016 3 次提交
    • W
      fix typo in comments (#1360) · 4defe306
      wenduo 提交于
      * fix typo in option.h's comment
      
      * fix typo in checkpoint's comment
      4defe306
    • A
      Add SeekForPrev() to Iterator · f517d9dd
      Aaron Gao 提交于
      Summary:
      Add new Iterator API, `SeekForPrev`: find the last key that <= target key
      support prefix_extractor
      support prefix_same_as_start
      support upper_bound
      not supported in iterators without Prev()
      
      Also add tests in db_iter_test and db_iterator_test
      
      Pass all tests
      Cheers!
      
      Test Plan: make all check -j64
      
      Reviewers: andrewkr, yiwu, IslamAbdelRahman, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D64149
      f517d9dd
    • Y
      Recompute compaction score on SetOptions (#1346) · eb3894cf
      yiwu-arbug 提交于
      Summary: We didn't recompute compaction score on SetOptions, and end up not having compaction if no flush happens afterward. The PR fixing it.
      
      Test Plan: See unit test.
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D64167
      eb3894cf
  10. 27 9月, 2016 2 次提交
    • I
      Fix AddFile() conflict with compaction output [WaitForAddFile()] · 5c64fb67
      Islam AbdelRahman 提交于
      Summary:
      Since AddFile unlock/lock the mutex inside LogAndApply() we need to ensure that during this period other compactions cannot run since such compactions are not aware of the file we are ingesting and could create a compaction that overlap wit this file
      
      this diff add
      - WaitForAddFile() call that will ensure that no AddFile() calls are being processed right now
      - Call `WaitForAddFile()` in 3 locations
      -- When doing manual Compaction
      -- When starting automatic Compaction
      -- When  doing CompactFiles()
      
      Test Plan: unit test
      
      Reviewers: lightmark, yiwu, andrewkr, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, yoshinorim, jkedgar, dhruba
      
      Differential Revision: https://reviews.facebook.net/D64383
      5c64fb67
    • I
      9e9f5a0b