diff --git a/CHANGELOG.md b/CHANGELOG.md index 2751519d..c4ff7742 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,25 @@ # Change history +## May 15 2015 : v1.5.1 + + Maintenance release. + + * **Improvements** + + * Use type alias instead of struct for NullValue. + + * Removed workaround regarding filtering bin names on the client for `BatchGet`. + + * **Fixes** + + * Fixed minor bugs regarding handling of nulls in structs for `GetObj()` and `PutObj()`. + + * ** Other Changes ** + + * Removed deprecated `ReplaceRoles()` method. + + * Removed deprecated `SetCapacity()` and `GetCapacity()` methods. + ## April 13 2015 : v1.5.0 This release includes potential BREAKING CHANGES. diff --git a/batch_command_get.go b/batch_command_get.go index 1b0b3234..74cbd0b8 100644 --- a/batch_command_get.go +++ b/batch_command_get.go @@ -112,15 +112,10 @@ func (cmd *batchCommandGet) parseRecordResults(ifc command, receiveSize int) (bo return true, nil } -func contains(a map[string]struct{}, elem string) bool { - _, exists := a[elem] - return exists -} - // Parses the given byte buffer and populate the result object. // Returns the number of bytes that were parsed from the given buffer. func (cmd *batchCommandGet) parseRecord(key *Key, opCount int, generation int, expiration int) (*Record, error) { - var bins map[string]interface{} + bins := make(map[string]interface{}, opCount) for i := 0; i < opCount; i++ { if err := cmd.readBytes(8); err != nil { @@ -144,15 +139,7 @@ func (cmd *batchCommandGet) parseRecord(key *Key, opCount int, generation int, e return nil, err } - // Currently, the batch command returns all the bins even if a subset of - // the bins are requested. We have to filter it on the client side. - // TODO: Filter batch bins on server! - if len(cmd.binNames) == 0 || contains(cmd.binNames, name) { - if bins == nil { - bins = map[string]interface{}{} - } - bins[name] = value - } + bins[name] = value } return newRecord(cmd.node, key, bins, generation, expiration), nil