Skip to content

Remove random write from SST file ingestion#4188

Closed
riversand963 wants to merge 1 commit intofacebook:masterfrom
riversand963:ingestion_no_randwr_3
Closed

Remove random write from SST file ingestion#4188
riversand963 wants to merge 1 commit intofacebook:masterfrom
riversand963:ingestion_no_randwr_3

Conversation

@riversand963
Copy link
Copy Markdown
Contributor

RocksDB used to store global_seqno in external SST files written by
SstFileWriter. During file ingestion, RocksDB uses pwrite to update the
global_seqno. Since random write is not supported in some non-POSIX compliant
file systems, external SST file ingestion is not supported on these file
systems. To address this limitation, we no longer update global_seqno during
file ingestion. Later RocksDB uses the MANIFEST and other information in table
properties to deduce global seqno for externally-ingested SST files.

Test plan:

$make clean && make -j16 all check
$./external_sst_file_test
$./external_sst_file_basic_test

RocksDB used to store global_seqno in external SST files written by
SstFileWriter. During file ingestion, RocksDB uses pwrite to update the
global_seqno. Since random write is not supported in some non-POSIX compliant
file systems, external SST file ingestion is not supported on these file
systems. To address this limitation, we no longer update global_seqno during
file ingestion. Later RocksDB uses the MANIFEST and other information in table
properties to deduce global seqno for externally-ingested SST files.

Test plan:
```
$make clean && make -j16 all check
$./external_sst_file_test
$./external_sst_file_basic_test
```
@siying
Copy link
Copy Markdown
Contributor

siying commented Jul 25, 2018

Discussed offline. We need to consider two things:

  1. Compatibility. We should make sure that a DB bulk loaded files with this PR, will be able to be opened by several recent releases. In this way, we need to introduce an option for users to still ingest files with seqno written in the file. Similarly, files generated by SST file writer with newer release should be able to bulk loaded with DB using older release, and vice versa.
  2. It's better to avoid the access to FileMetaData in normal read code path, as this introduces one more cache miss.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

Thank you for your pull request. We require contributors to sign our Contributor License Agreement, and yours has expired.

Before we can review or merge your code, we need you to email cla@fb.com with your details so we can update your status.

@riversand963
Copy link
Copy Markdown
Contributor Author

Move to #4172

@riversand963 riversand963 deleted the ingestion_no_randwr_3 branch August 13, 2018 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants