Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions pkg/connection/reconcile_topic.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,13 +265,11 @@ func applySchema(pulsarAdmin admin.PulsarAdmin, topic *resourcev1alpha1.PulsarTo
return err
}
}
} else if schema != nil {
// Delete the schema when the schema exists and schema info is empty
log.Info("Deleting topic schema", "name", topic.Spec.Name)
if err := pulsarAdmin.DeleteSchema(topic.Spec.Name); err != nil {
return err
}
}
// Note: We intentionally do NOT delete existing schemas when schemaInfo is not specified.
// This preserves existing schemas that may have been created by producers/consumers,
// which is the expected behavior for most users. If schema deletion is needed,
// users should explicitly manage it through the Pulsar admin APIs.
return nil
}

Expand Down
Loading