Skip to content

Commit dc283c8

Browse files
BenHuddlestondaverigby
authored andcommitted
MB-41857: Rename OpenResult to OpenForWriteResult
Change-Id: I63755c6667cf662c993d3a5f7d3a67da7289648c Reviewed-on: http://review.couchbase.org/c/kv_engine/+/137784 Tested-by: Build Bot <[email protected]> Reviewed-by: Dave Rigby <[email protected]>
1 parent d114dcc commit dc283c8

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2048,7 +2048,7 @@ CouchKVStore::OpenForReadResult CouchKVStore::openDbForRead(
20482048
return {COUCHSTORE_SUCCESS, std::move(handle)};
20492049
}
20502050

2051-
CouchKVStore::OpenResult CouchKVStore::openDbForWrite(Vbid vbucketId) {
2051+
CouchKVStore::OpenForWriteResult CouchKVStore::openDbForWrite(Vbid vbucketId) {
20522052
// MB-27963: obtain read access whilst we open the file, updateDbFileMap
20532053
// serialises on this mutex so we can be sure the fileRev we read should
20542054
// still be a valid file once we hit sys_open

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ class CouchKVStore : public KVStore
567567
* is a locked instance of the DbHolder (for exclusive use by the caller).
568568
* If the open failed then status contains the reason, and `db` is empty.
569569
*/
570-
struct OpenResult {
570+
struct OpenForWriteResult {
571571
couchstore_error_t status;
572572
CouchKVStoreFileCache::CacheMap::mapped_type::LockedPtr db;
573573

@@ -576,23 +576,23 @@ class CouchKVStore : public KVStore
576576
// valid
577577
uint64_t fileRev;
578578

579-
// Should the Db be closed when OpenResult is destroyed
579+
// Should the Db be closed when OpenForWriteResult is destroyed
580580
// (i.e DbHolder unlocked)?
581581
// Typically used for testing so every call to openDbForWrite() results
582582
// in an explicit couchstore_open / close pair.
583583
bool closeOnUnlock = false;
584584

585-
~OpenResult() {
585+
~OpenForWriteResult() {
586586
if (closeOnUnlock) {
587587
db->close();
588588
}
589589
}
590590
// Declaring the dtor disables auto-generation of the various ctors,
591591
// so need to explicitly re-enable move.
592-
OpenResult(OpenResult&&) = default;
592+
OpenForWriteResult(OpenForWriteResult&&) = default;
593593
};
594594

595-
OpenResult openDbForWrite(Vbid vbucketId);
595+
OpenForWriteResult openDbForWrite(Vbid vbucketId);
596596

597597
couchstore_error_t openSpecificDB(Vbid vbucketId,
598598
uint64_t rev,

0 commit comments

Comments
 (0)