Fix merge conflict in CHANGELOG.md

pull/1932/head
Todd Persen 2015-03-12 11:41:30 -07:00
commit 3e4e56d31f
4 changed files with 8 additions and 5 deletions

View File

@ -6,6 +6,7 @@
- [#1929](https://github.com/influxdb/influxdb/pull/1929): Default Retention Policy incorrectly auto created.
- [#1930](https://github.com/influxdb/influxdb/pull/1930): Auto create database for graphite if not specified.
- [#1908](https://github.com/influxdb/influxdb/pull/1908): Cosmetic CLI output fixes.
- [#1931](https://github.com/influxdb/influxdb/pull/1931): Add default column to SHOW RETENTION POLICIES.
### Features
- [#1902](https://github.com/influxdb/influxdb/pull/1902): Enforce retention policies to have a minimum duration.

View File

@ -686,7 +686,7 @@ func runTestsData(t *testing.T, testName string, nodes Cluster, database, retent
{
name: "Check for default retention policy",
query: `SHOW RETENTION POLICIES mydatabase`,
expected: `{"results":[{"series":[{"columns":["name","duration","replicaN"],"values":[["default","0",1]]}]}]}`,
expected: `{"results":[{"series":[{"columns":["name","duration","replicaN","default"],"values":[["default","0",1,true]]}]}]}`,
},
{
name: "Ensure retention policy with infinite retention can be created",
@ -1027,7 +1027,7 @@ func Test_ServerSingleGraphiteIntegration_NoDatabase(t *testing.T) {
}
// Need to wait for the database to get a default retention policy
expected = `{"results":[{"series":[{"columns":["name","duration","replicaN"],"values":[["default","0",1]]}]}]}`
expected = `{"results":[{"series":[{"columns":["name","duration","replicaN","default"],"values":[["default","0",1,true]]}]}]}`
got, ok = queryAndWait(t, nodes, "graphite", `show retention policies graphite`, expected, 2*time.Second)
if !ok {
t.Errorf(`Test "%s" failed, expected: %s, got: %s`, testName, expected, got)

View File

@ -263,7 +263,7 @@ func TestHandler_RetentionPolicies(t *testing.T) {
if status != http.StatusOK {
t.Fatalf("unexpected status: %d", status)
} else if body != `{"results":[{"series":[{"columns":["name","duration","replicaN"],"values":[["bar","168h0m0s",1]]}]}]}` {
} else if body != `{"results":[{"series":[{"columns":["name","duration","replicaN","default"],"values":[["bar","168h0m0s",1,false]]}]}]}` {
t.Fatalf("unexpected body: %s", body)
}
}

View File

@ -2639,9 +2639,11 @@ func (s *Server) executeShowRetentionPoliciesStatement(q *influxql.ShowRetention
return &Result{Err: err}
}
row := &influxql.Row{Columns: []string{"name", "duration", "replicaN"}}
d := s.databases[q.Database]
row := &influxql.Row{Columns: []string{"name", "duration", "replicaN", "default"}}
for _, rp := range a {
row.Values = append(row.Values, []interface{}{rp.Name, rp.Duration.String(), rp.ReplicaN})
row.Values = append(row.Values, []interface{}{rp.Name, rp.Duration.String(), rp.ReplicaN, d.defaultRetentionPolicy == rp.Name})
}
return &Result{Series: []*influxql.Row{row}}
}