Skip to content

Commit

Permalink
bulker topic_manager: support bulker sharding
Browse files Browse the repository at this point in the history
  • Loading branch information
absorbb committed Mar 5, 2024
1 parent 57b10db commit 25a661a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bulkerapp/app/topic_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,12 @@ func (tm *TopicManager) processMetadata(metadata *kafka.Metadata, nonEmptyTopics
staleTopics := utils.NewSet[string]()

for topic, topicMetadata := range metadata.Topics {
allTopics.Put(topic)
hash := utils.HashStringInt(topic)
topicShardNum := hash % uint32(tm.config.ShardsCount)
if int(topicShardNum) != tm.shardNumber {
continue
}
allTopics.Put(topic)
if tm.abandonedTopics.Contains(topic) {
abandonedTopicsCount++
continue
Expand Down

0 comments on commit 25a661a

Please sign in to comment.