Use DCHECK_GT instead when checking _tablet_map_lock_shard_size (#3138)

This commit is contained in:
lichaoyong
2020-03-18 19:41:04 +08:00
committed by GitHub
parent 08e4035a41
commit 178bdcb16a

View File

@ -67,7 +67,7 @@ static bool _cmp_tablet_by_create_time(const TabletSharedPtr& a, const TabletSha
TabletManager::TabletManager(int32_t tablet_map_lock_shard_size)
: _tablet_map_lock_shard_size(tablet_map_lock_shard_size),
_last_update_stat_ms(0) {
DCHECK_LT(_tablet_map_lock_shard_size, 0);
DCHECK_GT(_tablet_map_lock_shard_size, 0);
_tablet_map_lock_array = new RWMutex[_tablet_map_lock_shard_size];
_tablet_map_array = new tablet_map_t[_tablet_map_lock_shard_size];
}