Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mds: don't maintain bloom filters in standby replay #12133

Merged
merged 2 commits into from Dec 7, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/mds/CDir.cc
Expand Up @@ -635,6 +635,13 @@ void CDir::add_to_bloom(CDentry *dn)
/* not create bloom filter for incomplete dir that was added by log replay */
if (!is_complete())
return;

/* don't maintain bloom filters in standby replay (saves cycles, and also
* avoids need to implement clearing it in EExport for #16924) */
if (cache->mds->is_standby_replay()) {
return;
}

unsigned size = get_num_head_items() + get_num_snap_items();
if (size < 100) size = 100;
bloom.reset(new bloom_filter(size, 1.0 / size, 0));
Expand Down
20 changes: 16 additions & 4 deletions src/vstart.sh
Expand Up @@ -709,10 +709,6 @@ if [ "$start_mds" -eq 1 -a "$CEPH_NUM_MDS" -gt 0 ]; then
ceph_adm osd pool create "cephfs_data_${name}" 8
ceph_adm osd pool create "cephfs_metadata_${name}" 8
ceph_adm fs new "cephfs_${name}" "cephfs_metadata_${name}" "cephfs_data_${name}"
if [ "$CEPH_MAX_MDS" -gt 1 ]; then
ceph_adm fs set "cephfs_${name}" allow_multimds true --yes-i-really-mean-it
ceph_adm fs set "cephfs_${name}" max_mds "$CEPH_MAX_MDS"
fi
fs=$(($fs + 1))
[ $fs -eq $CEPH_NUM_FS ] && break
done
Expand Down Expand Up @@ -761,6 +757,22 @@ EOF
done
fi

# Don't set max_mds until all the daemons are started, otherwise
# the intended standbys might end up in active roles.
if [ "$CEPH_MAX_MDS" -gt 1 ]; then
sleep 5 # wait for daemons to make it into FSMap before increasing max_mds
fi
fs=0
for name in a b c d e f g h i j k l m n o p
do
if [ "$CEPH_MAX_MDS" -gt 1 ]; then
ceph_adm fs set "cephfs_${name}" allow_multimds true --yes-i-really-mean-it
ceph_adm fs set "cephfs_${name}" max_mds "$CEPH_MAX_MDS"
fi
fs=$(($fs + 1))
[ $fs -eq $CEPH_NUM_FS ] && break
done

if [ "$CEPH_NUM_MGR" -gt 0 ]; then
mgr=0
for name in x y z a b c d e f g h i j k l m n o p
Expand Down