Update ob_partition_group.cpp (#579)

This commit is contained in:
richie 2021-11-24 19:50:50 +08:00 committed by GitHub
parent 6bbcebca37
commit abe919ef4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3942,12 +3942,11 @@ int ObPartitionGroup::freeze(const bool emergency, const bool force, int64_t& fr
ObPartitionGroupLockGuard guard(lock_, 0, PGLOCKSTORAGE);
if (with_data_()) {
// F replica, need freeze;
// https://open.oceanbase.com/docs/community/oceanbase-database/V3.1.1/replica-overview
// FULL(F)/ READONLY(R)replica have sstable and memtable, need to be frozen
ret = freeze_log_and_data_v2_(emergency, force, freeze_snapshot);
// F/R replica are with data because they have sstable. The freeze operation will be skipped at
// lower layer because they do not have memtable.
} else {
// L replica or empty PG
// LOGONLY(L)replica or empty PG
ret = freeze_log_(force);
}