Skip to content

Commit

Permalink
Merge #38528
Browse files Browse the repository at this point in the history
38528: libroach: Prepare for RocksDB 6.2 upgrade r=ajkr a=ajkr

In our current RocksDB version (5.17), there are using-declarations for
`std::unique_ptr` inside a `namespace rocksdb` block in some header
files. Those were rightfully removed in the version we are about to
upgrade to (6.2). So we need to change libroach to not reference
`rocksdb::unique_ptr`.

Release note: None

Co-authored-by: Andrew Kryczka <[email protected]>
  • Loading branch information
craig[bot] and ajkr committed Jun 27, 2019
2 parents 042c9ce + db0e8e7 commit f73bc1d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion c-deps/libroach/db.cc
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,7 @@ DBStatus DBSstFileWriterFinish(DBSstFileWriter* fw, DBString* data) {
}

const rocksdb::EnvOptions soptions;
rocksdb::unique_ptr<rocksdb::SequentialFile> sst;
std::unique_ptr<rocksdb::SequentialFile> sst;
status = fw->memenv->NewSequentialFile("sst", &sst, soptions);
if (!status.ok()) {
return ToDBStatus(status);
Expand Down
4 changes: 2 additions & 2 deletions c-deps/libroach/engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ DBStatus DBImpl::EnvWriteFile(DBSlice path, DBSlice contents) {
rocksdb::Status s;

const rocksdb::EnvOptions soptions;
rocksdb::unique_ptr<rocksdb::WritableFile> destfile;
std::unique_ptr<rocksdb::WritableFile> destfile;
s = this->rep->GetEnv()->NewWritableFile(ToString(path), &destfile, soptions);
if (!s.ok()) {
return ToDBStatus(s);
Expand All @@ -367,7 +367,7 @@ DBStatus DBImpl::EnvWriteFile(DBSlice path, DBSlice contents) {
DBStatus DBImpl::EnvOpenFile(DBSlice path, rocksdb::WritableFile** file) {
rocksdb::Status status;
const rocksdb::EnvOptions soptions;
rocksdb::unique_ptr<rocksdb::WritableFile> rocksdb_file;
std::unique_ptr<rocksdb::WritableFile> rocksdb_file;

// Create the file.
status = this->rep->GetEnv()->NewWritableFile(ToString(path), &rocksdb_file, soptions);
Expand Down

0 comments on commit f73bc1d

Please sign in to comment.