mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-23 22:40:39 +02:00
normal if no partitions found
This commit is contained in:
1 parent
f1008b554e
commit
43f8332297
1 file changed
+3
-2
@@ -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