]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/log
rocksdb.git
11 years agoFlush before Fsync()/Sync() 2.8.fb 2.8.fb
Igor Canadi [Tue, 22 Apr 2014 00:45:04 +0000 (17:45 -0700)]
Flush before Fsync()/Sync()

Summary: Calling Fsync()/Sync() on a file should give the guarantee that whatever you written to the file is now persisted. This is currently not the case, since we might have some data left in application cache as we do Fsync()/Sync(). For example, BuildTable() calls Fsync() without the flush, assuming all sst data is now persisted, but it's actually not. This may result in big inconsistencies.

Test Plan: no test

Reviewers: sdong, dhruba, haobo, ljin, yhchiang

Reviewed By: sdong

CC: leveldb
Differential Revision: https://reviews.facebook.net/D18159

12 years agoRocksDB 2.8 to be able to read files generated by 2.6
sdong [Thu, 17 Apr 2014 02:30:33 +0000 (19:30 -0700)]
RocksDB 2.8 to be able to read files generated by 2.6

Summary:
From 2.6 to 2.7, property block name is renamed from rocksdb.stats to rocksdb.properties. Older properties were not able to be loaded. In 2.8, we seem to have added some logic that uses property block without checking null pointers, which create segment faults.

In this patch, we fix it by:
(1) try rocksdb.stats if rocksdb.properties is not found
(2) add some null checking before consuming rep->table_properties

Test Plan: make sure a file generated in 2.7 couldn't be opened now can be opened.

Reviewers: haobo, igor, yhchiang

Reviewed By: igor

CC: ljin, xjin, dhruba, kailiu, leveldb
Differential Revision: https://reviews.facebook.net/D17961

12 years agoUpdate HISTORY.md v2.8
sdong [Sat, 5 Apr 2014 00:00:25 +0000 (17:00 -0700)]
Update HISTORY.md

Summary: Update HISTORY.md to make existing items to 2.8 release and add something I think is missing.

Test Plan: N/A

Reviewers: haobo, igor, ljin, dhruba, yhchiang, xjin

Reviewed By: haobo

CC: leveldb
Differential Revision: https://reviews.facebook.net/D17517

12 years agorelax backupable db rate limit tests
Igor Canadi [Fri, 4 Apr 2014 23:27:47 +0000 (16:27 -0700)]
relax backupable db rate limit tests

12 years agoRemove -Wno-unused-const-variable
Igor Canadi [Fri, 4 Apr 2014 23:06:08 +0000 (16:06 -0700)]
Remove -Wno-unused-const-variable

12 years agoCreate log::Writer out of DB Mutex
sdong [Fri, 4 Apr 2014 05:04:42 +0000 (22:04 -0700)]
Create log::Writer out of DB Mutex

Summary: Our measurement shows that sometimes new log::Write's constructor can take hundreds of milliseconds. It's unclear why but just simply move it out of DB mutex.

Test Plan: make all check

Reviewers: haobo, ljin, igor

Reviewed By: haobo

CC: nkg-, yhchiang, leveldb
Differential Revision: https://reviews.facebook.net/D17487

12 years agomake hash_link_list Node's key space consecutively followed at the end
Lei Jin [Fri, 4 Apr 2014 22:37:28 +0000 (15:37 -0700)]
make hash_link_list Node's key space consecutively followed at the end

Summary: per sdong's request, this will help processor prefetch on n->key case.

Test Plan: make all check

Reviewers: sdong, haobo, igor

Reviewed By: sdong

CC: leveldb
Differential Revision: https://reviews.facebook.net/D17415

12 years agoDynamically choose SSE 4.2
Igor Canadi [Fri, 4 Apr 2014 21:03:19 +0000 (14:03 -0700)]
Dynamically choose SSE 4.2

Summary: Otherwise, if we compile on machine with SSE4.2 support and run it on machine without the support, we will fail.

Test Plan: compiles, verified that isSse42() gets called.

Reviewers: dhruba

Reviewed By: dhruba

CC: leveldb
Differential Revision: https://reviews.facebook.net/D17505

12 years agoMake RocksDB compile for iOS
Igor Canadi [Fri, 4 Apr 2014 20:11:44 +0000 (13:11 -0700)]
Make RocksDB compile for iOS

Summary:
I had to make number of changes to the code and Makefile:
* Add `make lib`, that will create static library without debug info. We need this to avoid growing binary too much. Currently it's 14MB.
* Remove cpuinfo() function and use __SSE4_2__ macro. We actually used the macro as part of Fast_CRC32() function.
As a result, I also accidentally fixed this issue: https://www.facebook.com/groups/rocksdb.dev/permalink/549700778461774/?stream_ref=2
* Remove __thread locals in OS_MACOSX

Test Plan: `make lib PLATFORM=IOS`

Reviewers: ljin, haobo, dhruba, sdong

Reviewed By: haobo

CC: leveldb
Differential Revision: https://reviews.facebook.net/D17475

12 years agoMerge branch 'jni'
Yueh-Hsuan Chiang [Fri, 4 Apr 2014 19:52:40 +0000 (12:52 -0700)]
Merge branch 'jni'

12 years agoFlush Buffered Info Logs Before Doing Compaction (one line change)
sdong [Fri, 4 Apr 2014 17:28:58 +0000 (10:28 -0700)]
Flush Buffered Info Logs Before Doing Compaction (one line change)

Summary: Flushing log buffer earlier to avoid confusion of time holding the locks.

Test Plan: Should be safe as long as several related db test passes

Reviewers: haobo, igor, ljin

Reviewed By: igor

CC: nkg-, leveldb
Differential Revision: https://reviews.facebook.net/D17493

12 years agoFix some other signed & unsigned comparisons
sdong [Wed, 2 Apr 2014 22:05:03 +0000 (15:05 -0700)]
Fix some other signed & unsigned comparisons

Summary: Fix some signed and unsigned comparisons to make some other build script happy.

Test Plan: Build and run those changed tests

Reviewers: ljin, igor, haobo

Reviewed By: igor

CC: yhchiang, dhruba, kailiu, leveldb
Differential Revision: https://reviews.facebook.net/D17463

12 years agoMerge branch 'master' into jni
Yueh-Hsuan Chiang [Fri, 4 Apr 2014 00:14:10 +0000 (17:14 -0700)]
Merge branch 'master' into jni

12 years ago[JNI] Avoid a potential byte-array-copy btw c++ and java in RocksDB.get(byte[], byte[]).
Yueh-Hsuan Chiang [Thu, 3 Apr 2014 06:54:50 +0000 (23:54 -0700)]
[JNI] Avoid a potential byte-array-copy btw c++ and java in RocksDB.get(byte[], byte[]).

Summary: Avoid a JNI call to GetByteArrayElements, which may introduce a byte-array-copy.

Test Plan: make jtest

Reviewers: haobo, sdong, dhruba

CC: leveldb
Differential Revision: https://reviews.facebook.net/D17451

12 years agoFix valgrind error in c_test
Igor Canadi [Thu, 3 Apr 2014 00:24:30 +0000 (17:24 -0700)]
Fix valgrind error in c_test