aboutsummaryrefslogtreecommitdiff
path: root/src/zenremotestore/projectstore/jupiterremoteprojectstore.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2025-10-23 14:57:06 +0200
committerGitHub Enterprise <[email protected]>2025-10-23 14:57:06 +0200
commit30198a519bd04f412c21916d093e7c7973bc02d7 (patch)
tree7f475d3d0d354df9f0cc6524860064bfcf28e01e /src/zenremotestore/projectstore/jupiterremoteprojectstore.cpp
parentadd --boost-workers option to zen builds prime-cache (#604) (diff)
downloadzen-30198a519bd04f412c21916d093e7c7973bc02d7.tar.xz
zen-30198a519bd04f412c21916d093e7c7973bc02d7.zip
add host discovery and zen cache support for oplog import (#601)
* add host discovery and zen cache support for oplog import
Diffstat (limited to 'src/zenremotestore/projectstore/jupiterremoteprojectstore.cpp')
-rw-r--r--src/zenremotestore/projectstore/jupiterremoteprojectstore.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/zenremotestore/projectstore/jupiterremoteprojectstore.cpp b/src/zenremotestore/projectstore/jupiterremoteprojectstore.cpp
index dda5ef99d..ca7a5b391 100644
--- a/src/zenremotestore/projectstore/jupiterremoteprojectstore.cpp
+++ b/src/zenremotestore/projectstore/jupiterremoteprojectstore.cpp
@@ -18,7 +18,8 @@ using namespace std::literals;
class JupiterRemoteStore : public RemoteProjectStore
{
public:
- JupiterRemoteStore(Ref<JupiterClient>&& InJupiterClient,
+ JupiterRemoteStore(LoggerRef InLog,
+ Ref<JupiterClient>&& InJupiterClient,
std::string_view Namespace,
std::string_view Bucket,
const IoHash& Key,
@@ -26,7 +27,8 @@ public:
bool ForceDisableBlocks,
bool ForceDisableTempBlocks,
const std::filesystem::path& TempFilePath)
- : m_JupiterClient(std::move(InJupiterClient))
+ : m_Log(InLog)
+ , m_JupiterClient(std::move(InJupiterClient))
, m_Namespace(Namespace)
, m_Bucket(Bucket)
, m_Key(Key)
@@ -232,6 +234,8 @@ public:
return Result;
}
+ virtual void Flush() override {}
+
private:
LoadContainerResult LoadContainer(const IoHash& Key)
{
@@ -323,6 +327,10 @@ private:
return {.ErrorCode = ErrorCode, .ElapsedSeconds = Response.ElapsedSeconds, .Reason = Response.Reason, .Text = Text};
}
+ inline LoggerRef Log() const { return m_Log; }
+
+ LoggerRef m_Log;
+
Ref<JupiterClient> m_JupiterClient;
const std::string m_Namespace;
const std::string m_Bucket;
@@ -343,7 +351,8 @@ private:
};
std::shared_ptr<RemoteProjectStore>
-CreateJupiterRemoteStore(const JupiterRemoteStoreOptions& Options,
+CreateJupiterRemoteStore(LoggerRef InLog,
+ const JupiterRemoteStoreOptions& Options,
const std::filesystem::path& TempFilePath,
bool Quiet,
bool Unattended,
@@ -392,7 +401,8 @@ CreateJupiterRemoteStore(const JupiterRemoteStoreOptions& Options,
Ref<JupiterClient> Client(new JupiterClient(ClientOptions, std::move(TokenProvider)));
- std::shared_ptr<RemoteProjectStore> RemoteStore = std::make_shared<JupiterRemoteStore>(std::move(Client),
+ std::shared_ptr<RemoteProjectStore> RemoteStore = std::make_shared<JupiterRemoteStore>(InLog,
+ std::move(Client),
Options.Namespace,
Options.Bucket,
Options.Key,