1. 03 5月, 2016 1 次提交
    • W
      Fix #1110, 32-bit build failure on Mac OSX (#1112) · b8cf9130
      Warren Falk 提交于
      Using explicit 64-bit type in conditional in platforms above 32-bits
      This appears to be necessary on Mac OSX as std::conditional does not appear to short circuit and evaluates the third template arg
      Making the third template arg be 64 bits explicitly works around this problem and will work on both 32 bit and 64+ bit platforms.
      b8cf9130
  2. 30 4月, 2016 6 次提交
    • I
      Fix calling GetCurrentMutableCFOptions in CompactionJob::ProcessKeyValueCompaction() · 21441c09
      Islam AbdelRahman 提交于
      Summary: GetCurrentMutableCFOptions() can only be called when DB mutex is held so we cannot call it in CompactionJob::ProcessKeyValueCompaction() since it's not holding the db mutex
      
      Test Plan: make check -j64
      
      Reviewers: sdong, andrewkr
      
      Reviewed By: andrewkr
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D57471
      21441c09
    • D
      Fix multiple issues with WinMmapFile fo sequential writing (#1108) · 4ea6e051
      Dmitri Smirnov 提交于
      make preallocation inline with other writable files
        make sure that we map no more than pre-allocated size.
      4ea6e051
    • I
      Fix clang build · f3bb024f
      Islam AbdelRahman 提交于
      Summary: fix clang build
      
      Test Plan: USE_CLANG make all -j64
      
      Reviewers: horuff, sdong
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D57453
      f3bb024f
    • R
      Modification of WriteBatch to support two phase commit · 6e56a114
      Reid Horuff 提交于
      Summary: Adds three new WriteBatch data types: Prepare(xid), Commit(xid), Rollback(xid). Prepare(xid) should precede the (single) operation to which is applies. There can obviously be multiple Prepare(xid) markers. There should only be one Rollback(xid) or Commit(xid) marker yet not both. None of this logic is currently enforced and will most likely be implemented further up such as in the memtableinserter. All three markers are similar to PutLogData in that they are writebatch meta-data, ie stored but not counted. All three markers differ from PutLogData in that they will actually be written to disk. As for WriteBatchWithIndex, Prepare, Commit, Rollback are all implemented just as PutLogData and none are tested just as PutLogData.
      
      Test Plan: single unit test in write_batch_test.
      
      Reviewers: hermanlee4, sdong, anthony
      
      Subscribers: andrewkr, vasilep, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D54093
      6e56a114
    • R
      ldb support new WAL records · 1d2e4ef7
      Reid Horuff 提交于
      1d2e4ef7
    • Y
      Added EventListener::OnTableFileCreationStarted() callback · a92049e3
      Yi Wu 提交于
      Summary: Added EventListener::OnTableFileCreationStarted. EventListener::OnTableFileCreated will be called on failure case. User can check creation status via TableFileCreationInfo::status.
      
      Test Plan: unit test.
      
      Reviewers: dhruba, yhchiang, ott, sdong
      
      Reviewed By: sdong
      
      Subscribers: sdong, kradhakrishnan, IslamAbdelRahman, andrewkr, yhchiang, leveldb, ott, dhruba
      
      Differential Revision: https://reviews.facebook.net/D56337
      a92049e3
  3. 29 4月, 2016 8 次提交
  4. 28 4月, 2016 8 次提交
    • L
      Merge pull request #1101 from flyd1005/wip-fix-typo · 6d4832a9
      Li Peng 提交于
      fix typos and remove duplicated words
      6d4832a9
    • I
      Fix typo in build_tools/fbcode_config.sh · af70f9ac
      Islam AbdelRahman 提交于
      Summary: Fix typo in build_tools/fbcode_config.sh
      
      Test Plan: none
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D57363
      af70f9ac
    • A
      Fix compression dictionary clang errors · 54de13ab
      Andrew Kryczka 提交于
      Summary: There were a few narrowing conversions that clang didn't like.
      
      Test Plan:
        $ make clean && USE_CLANG=1 DISABLE_JEMALLOC=1 TEST_TMPDIR=/dev/shm/rocksdb OPT=-g make -j32 check
      
      Reviewers: IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D57351
      54de13ab
    • I
      Fix build on machines without jemalloc · 0850bc51
      Islam AbdelRahman 提交于
      Summary: It looks like we mistakenly enable JEMALLOC even if it's not available on the machine, that's why travis is failing
      
      Test Plan:
      check on my devserver
      check on my mac
      
      Reviewers: sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D57345
      0850bc51
    • A
      Configurable compression in db_bench · 4032145a
      Andrew Kryczka 提交于
      Summary:
      Made compression type and dictionary size configurable via environment
      variables.
      
      Depends on D52287.
      
      Test Plan:
      check these options are passed to the db.
      
        $ COMPRESSION_MAX_DICT_BYTES=65536 COMPRESSION_TYPE=LZ4 NUM_KEYS=10000000 DB_DIR=./tmp/ WAL_DIR=./tmp/ ./tools/benchmark.sh filluniquerandom
        ...
        $ grep Options.compression tmp/LOG
        2016/04/22-19:11:30.397829 7f5f263a2980          Options.compression: LZ4
        ...
        2016/04/22-19:11:30.397837 7f5f263a2980         Options.compression_opts.max_dict_bytes: 65536
      
      Reviewers: IslamAbdelRahman, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D57141
      4032145a
    • A
      Shared dictionary compression using reference block · 843d2e31
      Andrew Kryczka 提交于
      Summary:
      This adds a new metablock containing a shared dictionary that is used
      to compress all data blocks in the SST file. The size of the shared dictionary
      is configurable in CompressionOptions and defaults to 0. It's currently only
      used for zlib/lz4/lz4hc, but the block will be stored in the SST regardless of
      the compression type if the user chooses a nonzero dictionary size.
      
      During compaction, computes the dictionary by randomly sampling the first
      output file in each subcompaction. It pre-computes the intervals to sample
      by assuming the output file will have the maximum allowable length. In case
      the file is smaller, some of the pre-computed sampling intervals can be beyond
      end-of-file, in which case we skip over those samples and the dictionary will
      be a bit smaller. After the dictionary is generated using the first file in a
      subcompaction, it is loaded into the compression library before writing each
      block in each subsequent file of that subcompaction.
      
      On the read path, gets the dictionary from the metablock, if it exists. Then,
      loads that dictionary into the compression library before reading each block.
      
      Test Plan: new unit test
      
      Reviewers: yhchiang, IslamAbdelRahman, cyan, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, yoshinorim, kradhakrishnan, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D52287
      843d2e31
    • Y
      Temporarily disable CompactFiles in db_stress in its default setting · ad573b90
      Yueh-Hsuan Chiang 提交于
      Summary:
      As db_stress with CompactFiles possibly catches a previous bug currently,
      temporarily disable CompactFiles in db_stress in its default setting
      to allows new bug to be detected while investigating the bug in CompactFiles.
      
      Test Plan: crash test
      
      Reviewers: sdong, kradhakrishnan, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D57333
      ad573b90
    • S
      Print memory allocation counters · 1c80dfab
      Sergey Makarenko 提交于
      Summary:
      Introduced option to dump malloc statistics using new option flag.
          Added new command line option to db_bench tool to enable this
          funtionality.
          Also extended build to support environments with/without jemalloc.
      
      Test Plan:
      1) Build rocksdb using `make` command. Launch the following command
          `./db_bench --benchmarks=fillrandom --dump_malloc_stats=true
          --num=10000000` end verified that jemalloc dump is present in LOG file.
          2) Build rocksdb using `DISABLE_JEMALLOC=1  make db_bench -j32` and ran
          the same db_bench tool and found the following message in LOG file:
          "Please compile with jemalloc to enable malloc dump".
          3) Also built rocksdb using `make` command on MacOS to verify behavior
          in non-FB environment.
          Also to debug build configuration change temporary changed
          AM_DEFAULT_VERBOSITY = 1 in Makefile to see compiler and build
          tools output. For case 1) -DROCKSDB_JEMALLOC was present in compiler
          command line. For both 2) and 3) this flag was not present.
      
      Reviewers: sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D57321
      1c80dfab
  5. 27 4月, 2016 4 次提交
    • I
      Fix BackupableDBTest · eb739808
      Islam AbdelRahman 提交于
      Summary: Fix BackupableDBTest.NoDoubleCopy and BackupableDBTest.DifferentEnvs by mocking the db files in db_env instead of backup_env_
      
      Test Plan: make check -j64
      
      Reviewers: sdong, andrewkr
      
      Reviewed By: andrewkr
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D57273
      eb739808
    • S
      CompactedDB should not be used if there is outstanding WAL files · ac0e54b4
      sdong 提交于
      Summary: CompactedDB skips memtable. So we shouldn't use compacted DB if there is outstanding WAL files.
      
      Test Plan: Change to options.max_open_files = -1 perf context test to create a compacted DB, which we shouldn't do.
      
      Reviewers: yhchiang, kradhakrishnan, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: leveldb, andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D57057
      ac0e54b4
    • I
      Introduce PinnedIteratorsManager (Reduce PinData() overhead / Refactor PinData) · d719b095
      Islam AbdelRahman 提交于
      Summary:
      While trying to reuse PinData() / ReleasePinnedData() .. to optimize away some memcpys I realized that there is a significant overhead for using PinData() / ReleasePinnedData if they were called many times.
      This diff refactor the pinning logic by introducing PinnedIteratorsManager a centralized component that will be created once and will be notified whenever we need to Pin an Iterator. This implementation have much less overhead than the original implementation
      
      Test Plan:
      make check -j64
      COMPILE_WITH_ASAN=1 make check -j64
      
      Reviewers: yhchiang, sdong, andrewkr
      
      Reviewed By: andrewkr
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D56493
      d719b095
    • A
      Retrieve file size from proper Env · 1995e34d
      Andrew Kryczka 提交于
      Summary:
      When db_env_ != backup_env_, InsertPathnameToSizeBytes() would
      use the wrong Env during backup creation. This happened because this function
      used backup_env_ instead of db_env_ to get WAL/data file sizes.
      
      This diff adds an argument to InsertPathnameToSizeBytes() indicating which Env
      to use.
      
      Test Plan: ran @anirbanb's BackupTestTool
      
      Reviewers: sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D57159
      1995e34d
  6. 26 4月, 2016 5 次提交
  7. 23 4月, 2016 7 次提交
  8. 22 4月, 2016 1 次提交