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

This commit is contained in:
crossoverJie 2023-08-27 07:24:26 +08:00 committed by GitHub
parent 501d8e1978
commit cde5029bce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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()