]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commitdiff
Fix stress test failure when using mmap-reads.
authorDhruba Borthakur <dhruba@fb.com>
Wed, 6 Nov 2013 22:16:22 +0000 (14:16 -0800)
committerDhruba Borthakur <dhruba@fb.com>
Wed, 6 Nov 2013 23:40:26 +0000 (15:40 -0800)
Summary:
The mmap-read file->Read() does not use the scratch buffer to
read in file-contents.

Test Plan: ./db_stress --test_batches_snapshots=1 --ops_per_thread=100000000 --threads=32 --write_buffer_size=4194304 --destroy_db_initially=0 --reopen=0 --readpercent=45 --prefixpercent=5 --writepercent=35 --delpercent=5 --iterpercent=10 --db=/tmp/dhruba --max_key=100000000 --disable_seek_compaction=0 --mmap_read=1 --block_size=16384 --cache_size=1048576 --open_files=500000 --verify_checksum=1 --sync=1 --disable_wal=0 --disable_data_sync=0 --target_file_size_base=2097152 --target_file_size_multiplier=2 --max_write_buffer_number=3 --max_background_compactions=20 --max_bytes_for_level_base=10485760 --filter_deletes=0

Reviewers: haobo, kailiu

Reviewed By: kailiu

CC: leveldb, kailiu, emayanke
Differential Revision: https://reviews.facebook.net/D13923

table/format.cc

index 1eb50ef3383eabe4379bebf9ac1c8ac936ec3ee5..ff6d8fa2415ccb4ba71781c4e141774881990916 100644 (file)
@@ -135,7 +135,7 @@ Status ReadBlockContents(RandomAccessFile* file,
     result->compression_type = (rocksdb::CompressionType)data[n];
     s =  Status::OK();
   } else {
-    s = UncompressBlockContents(buf, n, result);
+    s = UncompressBlockContents(data, n, result);
     delete[] buf;
   }
   BumpPerfTime(&perf_context.block_decompress_time, &timer);