lib/logstorage: add nil check for ptwHot.pt (#4896)

(cherry picked from commit cde5029bce)
This commit is contained in:
crossoverJie 2023-08-27 07:24:26 +08:00 committed by hagen1778
parent 40b1f9611c
commit db0ae3fffb
No known key found for this signature in database
GPG Key ID: 3BF75F3741CA9640

View File

@ -395,7 +395,7 @@ func (s *Storage) MustAddRows(lr *LogRows) {
}
s.partitionsLock.Unlock()
if ptwHot != nil {
if ptwHot != nil && ptwHot.pt != nil {
if ptwHot.canAddAllRows(lr) {
ptwHot.pt.mustAddRows(lr)
ptwHot.decRef()