From 292c2b33570b5438a9d8226c8d870ad67df4f43a Mon Sep 17 00:00:00 2001 From: Dhruba Borthakur Date: Wed, 6 Nov 2013 14:16:22 -0800 Subject: [PATCH] Fix stress test failure when using mmap-reads. 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/table/format.cc b/table/format.cc index 1eb50ef33..ff6d8fa24 100644 --- a/table/format.cc +++ b/table/format.cc @@ -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); -- GitLab