Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
YangKian committed Jan 4, 2024
1 parent 9f09071 commit cba0f7f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions hstream-kafka/HStream/Kafka/Server/Handler/Topic.hs
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,10 @@ validateTopic [email protected]{..} = do
else Left (K.INVALID_CONFIG, Just $ T.pack ("Null value not supported for topic configs: " <> show nullConfigs))
validateNullConfig _ = Right topic

validateAssignments (K.unKaArray -> Just _) = Left (K.INVALID_REQUEST, unsuportedPartitionAssignments)
validateAssignments _ = Right topic
validateAssignments (K.unKaArray -> Nothing) = Right topic
validateAssignments (K.unKaArray -> Just as)
| V.null as = Right topic
validateAssignments _ = Left (K.INVALID_REQUEST, unsuportedPartitionAssignments)

validateReplica replica
| replica < -1 || replica == 0 = Left (K.INVALID_REPLICATION_FACTOR, invalidReplicaMsg)
Expand Down

0 comments on commit cba0f7f

Please sign in to comment.