1
0
mirror of https://github.com/google/leveldb.git synced 2025-04-15 13:20:37 +08:00
This commit is contained in:
MagnetoWang(王子贤) 2025-02-06 19:41:54 +08:00 committed by GitHub
commit 6cb80c3e0e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -239,7 +239,7 @@ inline void SkipList<Key, Comparator>::Iterator::SeekToLast() {
template <typename Key, class Comparator>
int SkipList<Key, Comparator>::RandomHeight() {
// Increase height with probability 1 in kBranching
static const unsigned int kBranching = 4;
static const unsigned int kBranching = 16;
int height = 1;
while (height < kMaxHeight && rnd_.OneIn(kBranching)) {
height++;