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

chore: support load/save from GCS #4006

Merged
merged 1 commit into from
Oct 30, 2024
Merged

chore: support load/save from GCS #4006

merged 1 commit into from
Oct 30, 2024

Conversation

romange
Copy link
Collaborator

@romange romange commented Oct 28, 2024

Not everything is supported but manual load save is supported.

  1. Run dragonfly with --dir gs://bucket/path
  2. In redis-cli: a. SET foo bar b. SAVE DF gsdump c. DFLY LOAD gs://bucket/path/gsdump-summary.dfs

@romange romange requested a review from BorysTheDev October 28, 2024 11:31
Not everything is supported but manual load save is supported.

1. Run dragonfly with `--dir gs://bucket/path`
2. In redis-cli:
   a. SET foo bar
   b. SAVE DF gsdump
   c. DFLY LOAD gs://bucket/path/gsdump-summary.dfs

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
@romange romange merged commit d10e76b into main Oct 30, 2024
12 checks passed
@romange romange deleted the GCS branch October 30, 2024 11:58
@sanathkandikanti
Copy link

@romange i'm seeing build failures and i think it's related to this change, can you help

FAILED: src/server/CMakeFiles/dragonfly_lib.dir/detail/snapshot_storage.cc.o
/usr/bin/g++ -DBOOST_ALL_NO_LIB -DBOOST_ASIO_SEPARATE_COMPILATION -DBOOST_BEAST_SEPARATE_COMPILATION -DBOOST_CONTEXT_DYN_LINK -DBOOST_SYSTEM_DYN_LINK -DDFLY_ENABLE_MEMORY_TRACKING -DDFLY_USE_SSL -DGLOG_CUSTOM_PREFIX_SUPPORT -DUSE_ZMALLOC_MI -DWITH_AWS -I/home/sanathkandikanti/workplace/dragonfly -I/home/sanathkandikanti/workplace/dragonfly/genfiles -I/home/sanathkandikanti/workplace/dragonfly/src -I/home/sanathkandikanti/workplace/dragonfly/helio -I/home/sanathkandikanti/workplace/dragonfly/genfiles/src -I/home/sanathkandikanti/workplace/dragonfly/build-dbg/_deps/glog-build -I/home/sanathkandikanti/workplace/dragonfly/build-dbg/_deps/glog-src/src -I/home/sanathkandikanti/workplace/dragonfly/build-dbg/_deps/abseil_cpp-src -isystem /home/sanathkandikanti/workplace/dragonfly/build-dbg/third_party/libs/xxhash/include -isystem /home/sanathkandikanti/workplace/dragonfly/build-dbg/third_party/libs/mimalloc/include -isystem /home/sanathkandikanti/workplace/dragonfly/build-dbg/third_party/libs/lua/include -isystem /home/sanathkandikanti/workplace/dragonfly/build-dbg/third_party/libs/uring/include -isystem /home/sanathkandikanti/workplace/dragonfly/build-dbg/third_party/libs/cares/include -isystem /home/sanathkandikanti/workplace/dragonfly/build-dbg/third_party/libs/reflex/include -isystem /home/sanathkandikanti/workplace/dragonfly/build-dbg/third_party/libs/uni-algo/include -isystem /home/sanathkandikanti/workplace/dragonfly/build-dbg/third_party/libs/hnswlib/include -isystem /home/sanathkandikanti/workplace/dragonfly/build-dbg/third_party/libs/jsoncons/include -isystem /home/sanathkandikanti/workplace/dragonfly/build-dbg/third_party/libs/flatbuffers/include -isystem /home/sanathkandikanti/workplace/dragonfly/build-dbg/third_party/libs/dconv/include -isystem /home/sanathkandikanti/workplace/dragonfly/build-dbg/third_party/libs/fast_float/include -isystem /home/sanathkandikanti/workplace/dragonfly/build-dbg/third_party/libs/gperf/include -isystem /home/sanathkandikanti/workplace/dragonfly/build-dbg/third_party/libs/aws/include -isystem /home/sanathkandikanti/workplace/dragonfly/build-dbg/third_party/libs/rapidjson/include -isystem /home/sanathkandikanti/workplace/dragonfly/build-dbg/third_party/libs/lz4/include -isystem /home/sanathkandikanti/workplace/dragonfly/build-dbg/third_party/libs/croncpp/include -Wall -Wextra -g -fPIC -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -fno-omit-frame-pointer -Wno-unused-parameter -march=sandybridge -mtune=skylake -Wno-use-after-free  -std=c++20 -DHAS_RAWMEMCHR -fdiagnostics-color=always  -g -std=gnu++17 -MD -MT src/server/CMakeFiles/dragonfly_lib.dir/detail/snapshot_storage.cc.o -MF src/server/CMakeFiles/dragonfly_lib.dir/detail/snapshot_storage.cc.o.d -o src/server/CMakeFiles/dragonfly_lib.dir/detail/snapshot_storage.cc.o -c /home/sanathkandikanti/workplace/dragonfly/src/server/detail/snapshot_storage.cc
/home/sanathkandikanti/workplace/dragonfly/src/server/detail/snapshot_storage.cc: In member function ‘virtual io::Result<std::pair<io::Sink*, unsigned char>, dfly::GenericError> dfly::detail::GcsSnapshotStorage::OpenWriteFile(const std::string&)’:
/home/sanathkandikanti/workplace/dragonfly/src/server/detail/snapshot_storage.cc:224:56: error: ‘CreateApiConnectionPool’ is not a member of ‘util::cloud::GCS’
  224 |   unique_ptr<http::ClientPool> conn_pool = cloud::GCS::CreateApiConnectionPool(ctx_, proactor);
      |                                                        ^~~~~~~~~~~~~~~~~~~~~~~
/home/sanathkandikanti/workplace/dragonfly/src/server/detail/snapshot_storage.cc:225:10: error: ‘GcsWriteFileOptions’ is not a member of ‘util::cloud’
  225 |   cloud::GcsWriteFileOptions opts;
      |          ^~~~~~~~~~~~~~~~~~~
/home/sanathkandikanti/workplace/dragonfly/src/server/detail/snapshot_storage.cc:226:3: error: ‘opts’ was not declared in this scope
  226 |   opts.creds_provider = &creds_provider_;
      |   ^~~~
/home/sanathkandikanti/workplace/dragonfly/src/server/detail/snapshot_storage.cc: In member function ‘virtual io::ReadonlyFileOrError dfly::detail::GcsSnapshotStorage::OpenReadFile(const std::string&)’:
/home/sanathkandikanti/workplace/dragonfly/src/server/detail/snapshot_storage.cc:245:56: error: ‘CreateApiConnectionPool’ is not a member of ‘util::cloud::GCS’
  245 |   unique_ptr<http::ClientPool> conn_pool = cloud::GCS::CreateApiConnectionPool(ctx_, proactor);
      |                                                        ^~~~~~~~~~~~~~~~~~~~~~~
/home/sanathkandikanti/workplace/dragonfly/src/server/detail/snapshot_storage.cc:246:10: error: ‘GcsReadFileOptions’ is not a member of ‘util::cloud’
  246 |   cloud::GcsReadFileOptions opts;
      |          ^~~~~~~~~~~~~~~~~~
/home/sanathkandikanti/workplace/dragonfly/src/server/detail/snapshot_storage.cc:247:3: error: ‘opts’ was not declared in this scope
  247 |   opts.creds_provider = &creds_provider_;
      |   ^~~~
/home/sanathkandikanti/workplace/dragonfly/src/server/detail/snapshot_storage.cc:251:17: error: ‘OpenReadGcsFile’ is not a member of ‘util::cloud’; did you mean ‘OpenWriteGcsFile’?
  251 |   return cloud::OpenReadGcsFile(bucket, key, opts);
      |                 ^~~~~~~~~~~~~~~
      |                 OpenWriteGcsFile
[550/575] Building CXX object src/server/CMakeFiles/dragonfly_lib.dir/set_family.cc.o
ninja: build stopped: subcommand failed.

@romange
Copy link
Collaborator Author

romange commented Nov 2, 2024

git submodule update

@sanathkandikanti
Copy link

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants