]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/log
rocksdb.git
7 years agoUpdate HISTORY.md rocksdb-5.10.4 v5.10.4
sdong [Thu, 1 Mar 2018 19:16:05 +0000 (11:16 -0800)]
Update HISTORY.md

8 years agoFixes the build on Windows
Adam Retter [Wed, 3 Jan 2018 20:22:40 +0000 (12:22 -0800)]
Fixes the build on Windows

Summary:
As discovered during v5.9.2 release, and forward-ported.
Closes https://github.com/facebook/rocksdb/pull/3323

Differential Revision: D6657209

Pulled By: siying

fbshipit-source-id: b560d9f8ddb89e0ffaff7c895ec80f68ddf7dab4

8 years agoupdate history and bump version
Andrew Kryczka [Thu, 22 Feb 2018 21:58:31 +0000 (13:58 -0800)]
update history and bump version

8 years agoBackupEngine gluster-friendly file naming convention
Andrew Kryczka [Thu, 22 Feb 2018 01:33:14 +0000 (17:33 -0800)]
BackupEngine gluster-friendly file naming convention

Summary:
Use the rsync tempfile naming convention in our `BackupEngine`. The temp file follows the format, `.<filename>.<suffix>`, which is later renamed to `<filename>`. We fix `tmp` as the `<suffix>` as we don't need to use random bytes for now. The benefit is gluster treats this tempfile naming convention specially and applies hashing only to `<filename>`, so the file won't need to be linked or moved when it's renamed. Our gluster team suggested this will make things operationally easier.
Closes https://github.com/facebook/rocksdb/pull/3463

Differential Revision: D6893333

Pulled By: ajkr

fbshipit-source-id: fd7622978f4b2487fce33cde40dd3124f16bcaa8

8 years agoUpdate HISTORY.md rocksdb-5.10.3 v5.10.3
sdong [Wed, 21 Feb 2018 23:12:10 +0000 (15:12 -0800)]
Update HISTORY.md

8 years agoAdd rocksdb.iterator.internal-key property
Sagar Vemuri [Wed, 21 Feb 2018 03:05:21 +0000 (19:05 -0800)]
Add rocksdb.iterator.internal-key property

Summary:
Added a new iterator property: `rocksdb.iterator.internal-key` to get the internal-key (converted to user key) at which the iterator stopped.
Closes https://github.com/facebook/rocksdb/pull/3525

Differential Revision: D7033694

Pulled By: sagar0

fbshipit-source-id: d51e6c00f5e9d766c6276ef79774b81c6c5216f8

8 years agoBump version to 5.10.3
Sagar Vemuri [Fri, 16 Feb 2018 22:18:14 +0000 (14:18 -0800)]
Bump version to 5.10.3

8 years agoFix deadlock in ColumnFamilyData::InstallSuperVersion()
Mike Kolupaev [Fri, 16 Feb 2018 15:58:18 +0000 (07:58 -0800)]
Fix deadlock in ColumnFamilyData::InstallSuperVersion()

Summary:
Deadlock: a memtable flush holds DB::mutex_ and calls ThreadLocalPtr::Scrape(), which locks ThreadLocalPtr mutex; meanwhile, a thread exit handler locks ThreadLocalPtr mutex and calls SuperVersionUnrefHandle, which tries to lock DB::mutex_.

This deadlock is hit all the time on our workload. It blocks our release.

In general, the problem is that ThreadLocalPtr takes an arbitrary callback and calls it while holding a lock on a global mutex. The same global mutex is (at least in some cases) locked by almost all ThreadLocalPtr methods, on any instance of ThreadLocalPtr. So, there'll be a deadlock if the callback tries to do anything to any instance of ThreadLocalPtr, or waits for another thread to do so.

So, probably the only safe way to use ThreadLocalPtr callbacks is to do only do simple and lock-free things in them.

This PR fixes the deadlock by making sure that local_sv_ never holds the last reference to a SuperVersion, and therefore SuperVersionUnrefHandle never has to do any nontrivial cleanup.

I also searched for other uses of ThreadLocalPtr to see if they may have similar bugs. There's only one other use, in transaction_lock_mgr.cc, and it looks fine.
Closes https://github.com/facebook/rocksdb/pull/3510

Reviewed By: sagar0

Differential Revision: D7005346

Pulled By: al13n321

fbshipit-source-id: 37575591b84f07a891d6659e87e784660fde815f

8 years agoDirect I/O writable file should do fsync in Close()
Siying Dong [Wed, 14 Feb 2018 00:20:13 +0000 (16:20 -0800)]
Direct I/O writable file should do fsync in Close()

Summary:
We don't do fsync() after truncate in direct I/O writeable file (in fact we don't do any fsync ever). This can cause metadata not persistent to disk after the file is generated. We call it instead.
Closes https://github.com/facebook/rocksdb/pull/3500

Differential Revision: D6981482

Pulled By: siying

fbshipit-source-id: 7e2b591b7e5dd1b96fc0775515b8b9e6092980ef

8 years agoFIXED: string buffers potentially too small to fit formatted write
Wouter Beek [Wed, 20 Dec 2017 16:02:53 +0000 (08:02 -0800)]
FIXED: string buffers potentially too small to fit formatted write

Summary:
This fixes the following warnings when compiled with GCC7:

util/transaction_test_util.cc: In static member function ‘static rocksdb::Status rocksdb::RandomTransactionInserter::DBGet(rocksdb::DB*, rocksdb::Transaction*, rocksdb::ReadOptions&, uint16_t, uint64_t, bool, uint64_t*, std::__cxx11::string*, bool*)’:
util/transaction_test_util.cc:75:8: error: ‘snprintf’ output may be truncated before the last format character [-Werror=format-truncation=]
 Status RandomTransactionInserter::DBGet(
        ^~~~~~~~~~~~~~~~~~~~~~~~~
util/transaction_test_util.cc:84:11: note: ‘snprintf’ output between 5 and 6 bytes into a destination of size 5
   snprintf(prefix_buf, sizeof(prefix_buf), "%.4u", set_i + 1);
   ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
util/transaction_test_util.cc: In static member function ‘static rocksdb::Status rocksdb::RandomTransactionInserter::Verify(rocksdb::DB*, uint16_t, uint64_t, bool, rocksdb::Random64*)’:
util/transaction_test_util.cc:245:8: error: ‘snprintf’ output may be truncated before the last format character [-Werror=format-truncation=]
 Status RandomTransactionInserter::Verify(DB* db, uint16_t num_sets,
        ^~~~~~~~~~~~~~~~~~~~~~~~~
util/transaction_test_util.cc:268:13: note: ‘snprintf’ output between 5 and 6 bytes into a destination of size 5
     snprintf(prefix_buf, sizeof(prefix_buf), "%.4u", set_i + 1);
     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Closes https://github.com/facebook/rocksdb/pull/3295

Differential Revision: D6609411

Pulled By: maysamyabandeh

fbshipit-source-id: 33f0add471056eb59db2f8bd4366e6dfbb1a187d

8 years agocrc32: suppress -Wimplicit-fallthrough warnings
Jun Wu [Thu, 1 Feb 2018 22:15:28 +0000 (14:15 -0800)]
crc32: suppress -Wimplicit-fallthrough warnings

Summary:
Workaround a bunch of "implicit-fallthrough" compiler errors, like:

```
util/crc32c.cc:533:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
   crc = _mm_crc32_u64(crc, *(uint64_t*)(buf + offset));
       ^
util/crc32c.cc:1016:9: note: in expansion of macro ‘CRCsinglet’
         CRCsinglet(crc0, next, -2 * 8);
         ^~~~~~~~~~
util/crc32c.cc:1017:7: note: here
       case 1:
```
Closes https://github.com/facebook/rocksdb/pull/3339

Reviewed By: sagar0

Differential Revision: D6874736

Pulled By: quark-zju

fbshipit-source-id: eec9f3bc135e12fca336928d01711006d5c3cb16

8 years agoSuppress lint in old files rocksdb-5.10.2 v5.10.2
Mark Isaacson [Mon, 29 Jan 2018 20:43:56 +0000 (12:43 -0800)]
Suppress lint in old files

Summary: Grandfather in super old lint issues to make a clean slate for moving forward that allows us to have stronger enforcement on new issues.

Reviewed By: yiwu-arbug

Differential Revision: D6821806

fbshipit-source-id: 22797d31ec58e9eb0255d3b66fedfcfcb0dc127c

8 years agoBump version to 5.10.2
Yi Wu [Tue, 30 Jan 2018 19:13:10 +0000 (11:13 -0800)]
Bump version to 5.10.2

8 years agoStackableDB optionally take shared ownership of the underlying DB
Yi Wu [Fri, 26 Jan 2018 23:12:16 +0000 (15:12 -0800)]
StackableDB optionally take shared ownership of the underlying DB

Summary:
Allow StackableDB optionally takes a shared_ptr on construction and thus hold shared ownership of the underlying DB.
Closes https://github.com/facebook/rocksdb/pull/3423

Differential Revision: D6824163

Pulled By: yiwu-arbug

fbshipit-source-id: dbdc30c42e007533a987ef413785e192340f03eb

8 years agoFix PowerPC dynamic java build
Sagar Vemuri [Fri, 12 Jan 2018 18:53:43 +0000 (10:53 -0800)]
Fix PowerPC dynamic java build

Summary:
Java build on PPC64le has been broken since a few months, due to #2716. Fixing it with the least amount of changes.
(We should cleanup a little around this code when time permits).

This should fix the build failures seen in http://140.211.168.68:8080/job/Rocksdb/ .
Closes https://github.com/facebook/rocksdb/pull/3359

Differential Revision: D6712938

Pulled By: sagar0

fbshipit-source-id: 3046e8f072180693de2af4762934ec1ace309ca4

8 years agoBump version to 5.10.1
Yi Wu [Fri, 19 Jan 2018 02:02:03 +0000 (18:02 -0800)]
Bump version to 5.10.1

8 years agoFix Flush() keep waiting after flush finish
Yi Wu [Fri, 19 Jan 2018 01:32:50 +0000 (17:32 -0800)]
Fix Flush() keep waiting after flush finish

Summary:
Flush() call could be waiting indefinitely if min_write_buffer_number_to_merge is used. Consider the sequence:
1. User call Flush() with flush_options.wait = true
2. The manual flush started in the background
3. New memtable become immutable because of writes. The new memtable will not trigger flush if min_write_buffer_number_to_merge is not reached.
4. The manual flush finish.

Because of the new memtable created at step 3 not being flush, previous logic of WaitForFlushMemTable() keep waiting, despite the memtables it intent to flush has been flushed.

Here instead of checking if there are any more memtables to flush, WaitForFlushMemTable() also check the id of the earliest memtable. If the id is larger than that of latest memtable at the time flush was initiated, it means all the memtable at the time of flush start has all been flush.
Closes https://github.com/facebook/rocksdb/pull/3378

Differential Revision: D6746789

Pulled By: yiwu-arbug

fbshipit-source-id: 35e698f71c7f90b06337a93e6825f4ea3b619bfa

8 years agoFreeBSD build support for RocksDB and RocksJava
Adam Retter [Thu, 11 Jan 2018 21:21:35 +0000 (13:21 -0800)]
FreeBSD build support for RocksDB and RocksJava

Summary:
Tested on a clean FreeBSD 11.01 x64.

Closes https://github.com/facebook/rocksdb/pull/1423
Closes https://github.com/facebook/rocksdb/pull/3357

Differential Revision: D6705868

Pulled By: sagar0

fbshipit-source-id: cbccbbdafd4f42922512ca03619a5d5583a425fd

8 years agofix powerpc java static build
Andrew Kryczka [Wed, 3 Jan 2018 20:37:07 +0000 (12:37 -0800)]
fix powerpc java static build

Summary:
added support for C and asm files as required for e612e317409e8a9d74cf05db0bd733403305f459.
Closes https://github.com/facebook/rocksdb/pull/3299

Differential Revision: D6612479

Pulled By: ajkr

fbshipit-source-id: 6263ed7c1602f249460421825c76b5721f396163

8 years agoFix zstd/zdict include path for java static build
Sagar Vemuri [Fri, 5 Jan 2018 23:30:12 +0000 (15:30 -0800)]
Fix zstd/zdict include path for java static build

Summary:
With the ZSTD dictionary generator support added in #3057
`PORTABLE=1 ROCKSDB_NO_FBCODE=1 make rocksdbjavastatic` fails as it can't find zdict.h. Specifically due to:
https://github.com/facebook/rocksdb/blob/e3a06f12d27fd50af7b6c5941973f529601f9a3e/util/compression.h#L39
In java static builds zstd code gets directly downloaded from https://github.com/facebook/zstd , and in there zdict.h is under dictBuilder directory. So, I modified libzstd.a target to use `make install` to collect all the header files into a single location and used that as the zstd's include path.
Closes https://github.com/facebook/rocksdb/pull/3260

Differential Revision: D6669850

Pulled By: sagar0

fbshipit-source-id: f8a7562a670e5aed4c4fb6034a921697590d7285

8 years agoFix db_bench write being disabled in lite build
Yi Wu [Tue, 9 Jan 2018 18:53:35 +0000 (10:53 -0800)]
Fix db_bench write being disabled in lite build

Summary:
The macro was added by mistake in #2372
Closes https://github.com/facebook/rocksdb/pull/3343

Differential Revision: D6681356

Pulled By: yiwu-arbug

fbshipit-source-id: 4180172fb0eaef4189c07f219241e0c261c03461