We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 564083d commit 7f97a12Copy full SHA for 7f97a12
contrib/raftable/state.c
@@ -254,7 +254,7 @@ void state_shmem_request()
254
info.dsize = info.max_dsize = hash_select_dirsize(RAFTABLE_HASH_SIZE);
255
flags = HASH_SHARED_MEM | HASH_ALLOC | HASH_DIRSIZE | HASH_ELEM;
256
RequestAddinShmemSpace(RAFTABLE_BLOCK_MEM + sizeof(State) + hash_get_shared_size(&info, flags));
257
- RequestAddinLWLocks(1);
+ RequestNamedLWLockTranche("raftable", 1);
258
}
259
260
StateP state_shmem_init()
@@ -274,7 +274,7 @@ StateP state_shmem_init()
274
);
275
Assert(state);
276
277
- state->lock = LWLockAssign();
+ state->lock = (LWLock*)GetNamedLWLockTranche("raftable");
278
279
state->hashtable = ShmemInitHash(
280
"raftable_hashtable",
0 commit comments