mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-01 01:40:44 +01:00
address comments
This commit is contained in:
1 parent
ac83adc6ce
commit
e901abffd3
4 files changed
+79
-53
No files matched your search
@@ -380,10 +380,9 @@ func (hms *HybridMessageScanner) discoverTopicPartitions(ctx context.Context) ([
|
||||
return nil, fmt.Errorf("failed to scan topic directory for partitions: %v", err)
|
||||
}
|
||||
|
||||
// If no partitions found, use fallback
|
||||
// If no partitions found, return error instead of masking the issue
|
||||
if len(allPartitions) == 0 {
|
||||
fmt.Printf("No partitions found in filesystem for topic %s, using default partition\n", hms.topic.String())
|
||||
return []topic.Partition{{RangeStart: 0, RangeStop: 1000}}, nil
|
||||
return nil, fmt.Errorf("no partitions found for topic %s", hms.topic.String())
|
||||
}
|
||||
|
||||
fmt.Printf("Discovered %d partitions for topic %s\n", len(allPartitions), hms.topic.String())
|
||||
|
||||
Reference in new issue
Block a user