mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-16 11:08:39 +02:00
guard copyDataBasedOnIndexFile size check against nil needle map
The post-compaction size validation at line 538 accesses v.nm.ContentSize() and v.nm.DeletedSize(). If CommitCompact has concurrently set v.nm to nil, this causes a SIGSEGV. Skip the validation when v.nm is nil since the actual data copy uses local needle maps (oldNm/newNm) and is unaffected. Fixes #8591
This commit is contained in:
1 parent
889ae7d22d
commit
0b7d5aac94
1 file changed
+1
-1
@@ -533,7 +533,7 @@ func (v *Volume) copyDataBasedOnIndexFile(opts *CompactOptions) (err error) {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if v.Ttl.String() == "" {
|
||||
if v.Ttl.String() == "" && v.nm != nil {
|
||||
dstDatSize, _, err := dstDatBackend.GetStat()
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in new issue
Block a user