diff --git a/ChangeLog.md b/ChangeLog.md index 136f195..0d902e7 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -6,6 +6,22 @@ to [Semantic Versioning](http://semver.org/) rules. ## [Next Release] +## [v1.3.2] - 2019-08-26 + +### Changed + +- The integer size of the activity data and account ID data in the FindTagsItem +structure returned by calls to FindTags() have been changed from `int32` to +`int64`. As has the type of the account ID parameter in calls to FindTags(). +- The integer size in the rollup values returned by calls to GetNodeState() have +been changed from `uint32` to `uint64`. + +### Fixed + +- Bug (severe): It is possible for some types of IRONdb data to deserialize into +values that overflow the 32-bit variables used to hold them. Created: 2019-07-01 +Fixed: 2019-08-27. + ## [v1.3.1] - 2019-08-26 ### Changed @@ -83,6 +99,7 @@ writing to histogram endpoints. any delay, once started. Created: 2019-03-12. Fixed: 2019-03-13. [Next Release]: https://github.com/circonus-labs/gosnowth +[v1.3.2]: https://github.com/circonus-labs/gosnowth/releases/tag/v1.3.2 [v1.3.1]: https://github.com/circonus-labs/gosnowth/releases/tag/v1.3.1 [v1.2.1]: https://github.com/circonus-labs/gosnowth/releases/tag/v1.2.1 [v1.2.0]: https://github.com/circonus-labs/gosnowth/releases/tag/v1.2.0 diff --git a/state.go b/state.go index cb3417e..cf6b6e7 100644 --- a/state.go +++ b/state.go @@ -66,7 +66,7 @@ type NodeState struct { // Rollup values represent node state rollups. type Rollup struct { RollupEntries - RollupList []uint32 `json:"rollups"` + RollupList []uint64 `json:"rollups"` Aggregate RollupDetails `json:"aggregate"` } @@ -80,7 +80,7 @@ func (r *Rollup) UnmarshalJSON(b []byte) error { if rollups, ok := m["rollups"].([]interface{}); ok { for _, v := range rollups { - r.RollupList = append(r.RollupList, uint32(v.(float64))) + r.RollupList = append(r.RollupList, uint64(v.(float64))) delete(m, "rollup") } } diff --git a/tags.go b/tags.go index 7f79557..c7df014 100644 --- a/tags.go +++ b/tags.go @@ -17,8 +17,8 @@ type FindTagsItem struct { MetricName string `json:"metric_name"` Category string `json:"category"` Type string `type:"type"` - AccountID int32 `json:"account_id"` - Activity [][]int32 `json:"activity,omitempty"` + AccountID int64 `json:"account_id"` + Activity [][]int64 `json:"activity,omitempty"` } // FindTagsResult values contain the results of a find tags request. @@ -28,7 +28,7 @@ type FindTagsResult struct { } // FindTags retrieves metrics that are associated with the provided tag query. -func (sc *SnowthClient) FindTags(node *SnowthNode, accountID int32, +func (sc *SnowthClient) FindTags(node *SnowthNode, accountID int64, query string, start, end string) (*FindTagsResult, error) { return sc.FindTagsContext(context.Background(), node, accountID, query, start, end) @@ -36,7 +36,7 @@ func (sc *SnowthClient) FindTags(node *SnowthNode, accountID int32, // FindTagsContext is the context aware version of FindTags. func (sc *SnowthClient) FindTagsContext(ctx context.Context, node *SnowthNode, - accountID int32, query string, start, end string) (*FindTagsResult, error) { + accountID int64, query string, start, end string) (*FindTagsResult, error) { u := fmt.Sprintf("%s?query=%s", sc.getURL(node, fmt.Sprintf("/find/%d/tags", accountID)), url.QueryEscape(query))