Skip to content

Commit ab3ce6b

Browse files
mrambacherigorcanadi
authored andcommitted
Changes to get rocksdb-cloud to build on Mac
1 parent 3eb3616 commit ab3ce6b

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

cloud/aws/aws_env.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ namespace detail {
3131
using ScheduledJob =
3232
std::pair<std::chrono::steady_clock::time_point, std::function<void(void)>>;
3333
struct Comp {
34-
bool operator()(const ScheduledJob& a, const ScheduledJob& b) {
34+
bool operator()(const ScheduledJob& a, const ScheduledJob& b) const {
3535
return a.first < b.first;
3636
}
3737
};

cloud/aws/aws_file.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class S3WritableFile : public WritableFile {
122122

123123
virtual ~S3WritableFile();
124124

125-
virtual Status Append(const Slice& data) {
125+
virtual Status Append(const Slice& data) override {
126126
assert(status_.ok());
127127
// write to temporary file
128128
return local_file_->Append(data);
@@ -156,16 +156,16 @@ class S3WritableFile : public WritableFile {
156156
return local_file_->Allocate(offset, len);
157157
}
158158

159-
virtual Status Flush() {
159+
virtual Status Flush() override {
160160
assert(status_.ok());
161161
return local_file_->Flush();
162162
}
163163

164-
virtual Status Sync();
164+
virtual Status Sync() override ;
165165

166166
virtual Status status() { return status_; }
167167

168-
virtual Status Close();
168+
virtual Status Close() override;
169169
};
170170

171171
} // namepace rocksdb

cloud/cloud_env_impl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class CloudEnvImpl : public CloudEnv {
2828
const LogType& GetLogType() const { return log_type_; }
2929

3030
// Returns the underlying env
31-
Env* GetBaseEnv() { return base_env_; }
31+
Env* GetBaseEnv() override { return base_env_; }
3232

3333
// The separator used to separate dbids while creating the dbid of a clone
3434
static constexpr const char* DBID_SEPARATOR = "rockset";

cloud/db_cloud_test.cc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include "rocksdb/cloud/db_cloud.h"
88
#include <algorithm>
99
#include <chrono>
10+
#include <inttypes.h>
1011
#include "cloud/aws/aws_env.h"
1112
#include "cloud/aws/aws_file.h"
1213
#include "cloud/db_cloud_impl.h"
@@ -237,10 +238,10 @@ class CloudTest : public testing::Test {
237238
std::string lpath = dbname_ + "/" + path;
238239
ASSERT_OK(aenv_->GetBaseEnv()->GetFileSize(lpath, &localSize));
239240
ASSERT_TRUE(localSize == cloudSize);
240-
Log(options_.info_log, "local file %s size %ld\n", lpath.c_str(), localSize);
241-
Log(options_.info_log, "cloud file %s size %ld\n", cpath.c_str(), cloudSize);
242-
printf("local file %s size %ld\n", lpath.c_str(), localSize);
243-
printf("cloud file %s size %ld\n", cpath.c_str(), cloudSize);
241+
Log(options_.info_log, "local file %s size %" PRIu64 "\n", lpath.c_str(), localSize);
242+
Log(options_.info_log, "cloud file %s size %" PRIu64 "\n", cpath.c_str(), cloudSize);
243+
printf("local file %s size %" PRIu64 "\n", lpath.c_str(), localSize);
244+
printf("cloud file %s size %" PRIu64 "\n", cpath.c_str(), cloudSize);
244245
}
245246
}
246247

0 commit comments

Comments
 (0)