Skip to content

Commit b2b6a20

Browse files
committed
Merge branch 'release-v0.11.0'
2 parents 8d76d81 + 94c4301 commit b2b6a20

File tree

170 files changed

+7223
-1517
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

170 files changed

+7223
-1517
lines changed

cmd/halyard/main.go

-43
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,6 @@ func main() {
3535
app.Flags = []cli.Flag{}
3636
app.Before = configure
3737
app.Commands = []*cli.Command{
38-
{
39-
Name: "migrate:duplicatepolicy",
40-
Usage: "set the topic duplication policies to none",
41-
Before: connectDB,
42-
After: closeDB,
43-
Action: migrateDuplicatePolicies,
44-
Flags: []cli.Flag{},
45-
},
4638
{
4739
Name: "topics:list",
4840
Usage: "list the topics, optionally filtered by a specific project",
@@ -120,41 +112,6 @@ func topicsList(c *cli.Context) (err error) {
120112
// Temporary Commands
121113
//===========================================================================
122114

123-
func migrateDuplicatePolicies(c *cli.Context) (err error) {
124-
topics := meta.ListAllTopics()
125-
defer topics.Release()
126-
127-
rowsAffected := 0
128-
for topics.Next() {
129-
var topic *api.Topic
130-
if topic, err = topics.Topic(); err != nil {
131-
return cli.Exit(fmt.Errorf("could not unmarshal topic %s: %w", topics.Key(), err), 1)
132-
}
133-
134-
if topic.Deduplication != nil && topic.Deduplication.Strategy != api.Deduplication_UNKNOWN {
135-
continue
136-
}
137-
138-
topic.Deduplication = &api.Deduplication{
139-
Strategy: api.Deduplication_NONE,
140-
Offset: api.Deduplication_OFFSET_EARLIEST,
141-
}
142-
143-
if err = meta.UpdateTopic(topic); err != nil {
144-
return cli.Exit(fmt.Errorf("could not update topic %s: %w", topics.Key(), err), 1)
145-
}
146-
147-
rowsAffected++
148-
}
149-
150-
if err = topics.Error(); err != nil {
151-
return cli.Exit(err, 1)
152-
}
153-
154-
fmt.Printf("duplicate policy migration complete, %d rows affected\n", rowsAffected)
155-
return nil
156-
}
157-
158115
//===========================================================================
159116
// Helper Commands
160117
//===========================================================================

0 commit comments

Comments
 (0)