Skip to content

Commit ef70471

Browse files
BenHuddlestondaverigby
authored andcommitted
MB-41857: Rename OpenForReadResult to OpenResult
In a future patch I want to use Open(ForRead)Result in a non-read use case. Change-Id: I8e524b11355247863a99d6880dd307a3475dd3b5 Reviewed-on: http://review.couchbase.org/c/kv_engine/+/137785 Tested-by: Build Bot <[email protected]> Reviewed-by: Dave Rigby <[email protected]>
1 parent 30fbadf commit ef70471

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

engines/ep/src/couch-kvstore/couch-kvstore.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2000,8 +2000,8 @@ couchstore_error_t CouchKVStore::openDB(Vbid vbucketId,
20002000
return openSpecificDB(vbucketId, fileRev, db, options, ops);
20012001
}
20022002

2003-
CouchKVStore::OpenForReadResult CouchKVStore::openDbForRead(
2004-
Vbid vbucketId, FileOpsInterface* ops) {
2003+
CouchKVStore::OpenResult CouchKVStore::openDbForRead(Vbid vbucketId,
2004+
FileOpsInterface* ops) {
20052005
// MB-27963: obtain read access whilst we open the file, updateDbFileMap
20062006
// serialises on this mutex so we can be sure the fileRev we read should
20072007
// still be a valid file once we hit sys_open

engines/ep/src/couch-kvstore/couch-kvstore.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -547,19 +547,18 @@ class CouchKVStore : public KVStore
547547
* reason and fileHandle should have a valid revision value but the
548548
* underlying Db shouldn't be used.
549549
*/
550-
struct OpenForReadResult {
550+
struct OpenResult {
551551
couchstore_error_t status;
552552
std::unique_ptr<CouchKVFileHandle> fileHandle;
553553

554-
~OpenForReadResult() = default;
554+
~OpenResult() = default;
555555

556556
// Declaring the dtor disables auto-generation of the various ctors,
557557
// so need to explicitly re-enable move.
558-
OpenForReadResult(OpenForReadResult&&) = default;
558+
OpenResult(OpenResult&&) = default;
559559
};
560560

561-
OpenForReadResult openDbForRead(Vbid vbucketId,
562-
FileOpsInterface* ops = nullptr);
561+
OpenResult openDbForRead(Vbid vbucketId, FileOpsInterface* ops = nullptr);
563562

564563
/**
565564
* The result of calling openDbForWrite.

engines/ep/tests/mock/mock_couch_kvstore.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ class MockCouchKVStore : public CouchKVStore {
117117
return std::make_unique<MockCouchKVStore>(configuration, dbFileRevMap);
118118
}
119119

120-
OpenForReadResult public_openDbForRead(Vbid vbid,
121-
FileOpsInterface* ops = nullptr) {
120+
OpenResult public_openDbForRead(Vbid vbid,
121+
FileOpsInterface* ops = nullptr) {
122122
return openDbForRead(vbid, ops);
123123
}
124124

0 commit comments

Comments
 (0)