Skip to content

Commit a9af051

Browse files
greensky00chiyoung
authored andcommitted
Do not access the old block cache in read/write operation with a new btree
Change-Id: I9b67b37499a962c3e4611d375e207eb578d395af Reviewed-on: http://review.couchbase.org/70365 Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com> Tested-by: Chiyoung Seo <chiyoung@couchbase.com>
1 parent d9fff37 commit a9af051

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/filemgr.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2176,7 +2176,8 @@ fdb_status FileMgr::read_FileMgr(bid_t bid, void *buf,
21762176
return FDB_RESULT_READ_FAIL;
21772177
}
21782178

2179-
if (global_config.getNcacheBlock() > 0) {
2179+
if (global_config.getNcacheBlock() > 0 &&
2180+
!ver_btreev2_format(getVersion())) {
21802181
lock_no = bid % DLOCK_MAX;
21812182
(void)lock_no;
21822183

@@ -2392,7 +2393,8 @@ fdb_status FileMgr::writeOffset(bid_t bid, uint64_t offset, uint64_t len,
23922393
}
23932394
}
23942395

2395-
if (global_config.getNcacheBlock() > 0) {
2396+
if (global_config.getNcacheBlock() > 0 &&
2397+
!ver_btreev2_format(getVersion())) {
23962398
lock_no = bid % DLOCK_MAX;
23972399
(void)lock_no;
23982400

0 commit comments

Comments
 (0)