Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for cloud data store #517

Merged
merged 34 commits into from
Aug 5, 2020
Merged

Add support for cloud data store #517

merged 34 commits into from
Aug 5, 2020

Conversation

de-sh
Copy link

@de-sh de-sh commented Jun 23, 2020

Summary

Integration with rockset/rocksdb-cloud to add CloudEnv features for operating with cloud services like AWS S3 as a datastore.

  • Created a sub-crate librocksdb_cloud_sys which contains the rocksdb-cloud sub-module containing code for managing cloud interactions, extracted from rockset/rocksdb-cloud and currently residing in tikv/rocksdb~6.4.cloud
  • Made necessary changes to tikv/rocksdb~6.4.tikv that is housed in the sub-module rocksdb within the parent crate.
  • Wrote CMakeLists.txt for use in the build process of rocksdb_cloud as a static library, usable for C-ABI based FFI calls. Added the above code to the build process of parent crate librocksdb_sys along with C-ABI binding code within crocksdb
  • Created 'cloud.rs' and added new_aws_env() method to Env type of rocksdb.rs that merely makes a call to the CloudEnv::NewAwsEnv() via FFI for use as library features upstream. A test for the same was also added here.
  • Used feature based conditional compile macros to all cloud interaction code.
  • Made requisite changes to CI config for handling AWS SDK compilation.
  • Added a sequence of steps to update submodule within Makefile

Solves #514

Checkpoints

  • Added rocksdb-cloud as submodule in crate librocksdb_cloud_sys.
  • Write CMakeLists.txt to build only cloud code.
  • Generate C-bindings to interface with NewAwsEnv and CloudEnvOptions
  • Create Env::new_aws_env as an interface in rust

.gitmodules Outdated Show resolved Hide resolved
@de-sh de-sh changed the title submodules: add rockset/rocksdb-cloud Add support for cloud data store Jun 27, 2020
.gitmodules Outdated Show resolved Hide resolved
Cargo.toml Outdated Show resolved Hide resolved
@yiwu-arbug yiwu-arbug added the status/WIP Status: Working in progress label Jul 9, 2020
@de-sh de-sh changed the base branch from master to tikv-3.x July 10, 2020 20:33
@yiwu-arbug yiwu-arbug changed the base branch from tikv-3.x to master July 15, 2020 18:14
@yiwu-arbug yiwu-arbug changed the base branch from master to tikv-3.x July 15, 2020 18:14
.travis.yml Outdated Show resolved Hide resolved
@de-sh de-sh changed the base branch from tikv-3.x to master July 21, 2020 20:52
.gitmodules Outdated Show resolved Hide resolved
librocksdb_sys/Cargo.toml Show resolved Hide resolved
Cargo.toml Show resolved Hide resolved
librocksdb_sys/librocksdb_cloud_sys/Cargo.toml Outdated Show resolved Hide resolved
librocksdb_sys/librocksdb_cloud_sys/CMakeLists.txt Outdated Show resolved Hide resolved
librocksdb_sys/librocksdb_cloud_sys/CMakeLists.txt Outdated Show resolved Hide resolved
src/rocksdb.rs Outdated Show resolved Hide resolved
src/cloud.rs Show resolved Hide resolved
src/cloud.rs Show resolved Hide resolved
yiwu-arbug pushed a commit to tikv/rocksdb that referenced this pull request Jul 27, 2020
Related to tikv/rust-rocksdb#517 and #182
### Summary
Adds code used in compiling with [rocksdb~6.4.tikv](https://github.com/tikv/rocksdb/tree/6.4.tikv) along with [rocksdb~6.4.cloud](https://github.com/tikv/rocksdb/tree/6.4.cloud)

### Changes
- Makes public the struct LogReporter so that it can be accessed by [rocksdb~6.4.cloud/cloud/manifest_reader.cc#L114](https://github.com/tikv/rocksdb/blob/6a7c514453e3e3e1c3bb57c18d8e0280089ccdcd/cloud/manifest_reader.cc#L114)

Signed-off-by: Devdutt Shenoi <[email protected]>
@yiwu-arbug yiwu-arbug added sig/engine SIG: Engine and removed status/WIP Status: Working in progress labels Aug 1, 2020
std::unique_ptr<CloudEnv> cloud_env;

CloudEnv* cenv;
if (SaveError(errptr, CloudEnv::NewAwsEnv(base_env->rep, cloud_options->rep,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the list of params are much different to in the cloud code https://github.com/tikv/rocksdb/blob/6.4.cloud/include/rocksdb/cloud/cloud_env_options.h#L291 does the code really being built?

Copy link
Collaborator

@yiwu-arbug yiwu-arbug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For all the new files, add the following header

 // Copyright 2020 TiKV Project Authors. Licensed under Apache-2.0.

Copy link
Collaborator

@yiwu-arbug yiwu-arbug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update Makefile to include a update_rocksdb_cloud target, similar to update_rocksdb and update_titan?

yiwu-arbug pushed a commit to tikv/rocksdb that referenced this pull request Aug 1, 2020
Copy link
Collaborator

@yiwu-arbug yiwu-arbug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the travis cache works now.

Copy link
Collaborator

@yiwu-arbug yiwu-arbug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yiwu-arbug yiwu-arbug merged commit 6ad6e05 into tikv:master Aug 5, 2020
@yiwu-arbug yiwu-arbug mentioned this pull request Aug 5, 2020
3 tasks
leoncamel added a commit to leoncamel/tikv.rust-rocksdb that referenced this pull request Jun 11, 2021
tabokie pushed a commit to tabokie/rocksdb that referenced this pull request May 12, 2022
Related to tikv/rust-rocksdb#517 and tikv#182
Adds code used in compiling with [rocksdb~6.4.tikv](https://github.com/tikv/rocksdb/tree/6.4.tikv) along with [rocksdb~6.4.cloud](https://github.com/tikv/rocksdb/tree/6.4.cloud)

- Makes public the struct LogReporter so that it can be accessed by [rocksdb~6.4.cloud/cloud/manifest_reader.cc#L114](https://github.com/tikv/rocksdb/blob/6a7c514453e3e3e1c3bb57c18d8e0280089ccdcd/cloud/manifest_reader.cc#L114)

Signed-off-by: Devdutt Shenoi <[email protected]>
Signed-off-by: tabokie <[email protected]>
tabokie pushed a commit to tikv/rocksdb that referenced this pull request May 12, 2022
Related to tikv/rust-rocksdb#517 and #182
Adds code used in compiling with [rocksdb~6.4.tikv](https://github.com/tikv/rocksdb/tree/6.4.tikv) along with [rocksdb~6.4.cloud](https://github.com/tikv/rocksdb/tree/6.4.cloud)

- Makes public the struct LogReporter so that it can be accessed by [rocksdb~6.4.cloud/cloud/manifest_reader.cc#L114](https://github.com/tikv/rocksdb/blob/6a7c514453e3e3e1c3bb57c18d8e0280089ccdcd/cloud/manifest_reader.cc#L114)

Signed-off-by: Devdutt Shenoi <[email protected]>
Signed-off-by: tabokie <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants