summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEtienne Petrel <etienne.petrel@mongodb.com>2021-12-21 06:20:21 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-12-21 07:25:59 +0000
commit986c2df098b15851ef5939cf540c5b3eab8f891b (patch)
treeebc42f7d803f475080476dd23096ef869845d1bb
parentb4a49448e6adfa70a90a975d31321488fd320556 (diff)
downloadmongo-986c2df098b15851ef5939cf540c5b3eab8f891b.tar.gz
Import wiredtiger: 745cefd2771370e1d621a4227cf06f36bbe2c1bc from branch mongodb-master
ref: ed9c74ed09..745cefd277 for: 5.3.0 WT-8568 Fix reference count race in block cache
-rw-r--r--src/third_party/wiredtiger/import.data2
-rw-r--r--src/third_party/wiredtiger/src/block_cache/block_cache.c2
-rw-r--r--src/third_party/wiredtiger/test/format/wts.c3
3 files changed, 2 insertions, 5 deletions
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data
index e5851ac0afe..b59721bb553 100644
--- a/src/third_party/wiredtiger/import.data
+++ b/src/third_party/wiredtiger/import.data
@@ -2,5 +2,5 @@
"vendor": "wiredtiger",
"github": "wiredtiger/wiredtiger.git",
"branch": "mongodb-master",
- "commit": "ed9c74ed0913cf7ff8b9a70ea0e0bd0c86b63a37"
+ "commit": "745cefd2771370e1d621a4227cf06f36bbe2c1bc"
}
diff --git a/src/third_party/wiredtiger/src/block_cache/block_cache.c b/src/third_party/wiredtiger/src/block_cache/block_cache.c
index e8387a626a5..9228eaebbe1 100644
--- a/src/third_party/wiredtiger/src/block_cache/block_cache.c
+++ b/src/third_party/wiredtiger/src/block_cache/block_cache.c
@@ -363,7 +363,7 @@ __wt_blkcache_get(WT_SESSION_IMPL *session, const uint8_t *addr, size_t addr_siz
if (blkcache_item->freq_rec_counter < 0)
blkcache_item->freq_rec_counter = 0;
blkcache_item->freq_rec_counter++;
- blkcache_item->ref_count++;
+ (void)__wt_atomic_addv32(&blkcache_item->ref_count, 1);
break;
}
}
diff --git a/src/third_party/wiredtiger/test/format/wts.c b/src/third_party/wiredtiger/test/format/wts.c
index de0e7e61e45..4ef365502d9 100644
--- a/src/third_party/wiredtiger/test/format/wts.c
+++ b/src/third_party/wiredtiger/test/format/wts.c
@@ -211,8 +211,6 @@ create_database(const char *home, WT_CONNECTION **connp)
if (GV(RUNS_IN_MEMORY) != 0)
CONFIG_APPEND(p, ",in_memory=1");
-#if 0
- /* FIXME: WT-8568 */
/* Block cache configuration. */
if (GV(BLOCK_CACHE) != 0)
CONFIG_APPEND(p,
@@ -222,7 +220,6 @@ create_database(const char *home, WT_CONNECTION **connp)
",size=%" PRIu32 "MB)",
GV(BLOCK_CACHE_CACHE_ON_CHECKPOINT) == 0 ? "false" : "true",
GV(BLOCK_CACHE_CACHE_ON_WRITES) == 0 ? "false" : "true", GV(BLOCK_CACHE_SIZE));
-#endif
/* LSM configuration. */
if (g.lsm_config)