mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-18 20:07:55 +08:00
normal if no partitions found
This commit is contained in:
@@ -446,9 +446,10 @@ func (hms *HybridMessageScanner) discoverTopicPartitions(ctx context.Context) ([
|
||||
return nil, fmt.Errorf("failed to scan topic directory for partitions: %v", err)
|
||||
}
|
||||
|
||||
// If no partitions found, return error instead of masking the issue
|
||||
// If no partitions found, return empty slice (valid for newly created or empty topics)
|
||||
if len(allPartitions) == 0 {
|
||||
return nil, fmt.Errorf("no partitions found for topic %s", hms.topic.String())
|
||||
fmt.Printf("No partitions found for topic %s - returning empty result set\n", hms.topic.String())
|
||||
return []topic.Partition{}, nil
|
||||
}
|
||||
|
||||
fmt.Printf("Discovered %d partitions for topic %s\n", len(allPartitions), hms.topic.String())
|
||||
|
Reference in New Issue
Block a user