Skip to content

Commit

Permalink
fixed setting TaskIds on the client
Browse files Browse the repository at this point in the history
  • Loading branch information
khaf committed May 15, 2015
1 parent 166bdd7 commit 01b7c7b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

* Fixed minor bugs regarding handling of nulls in structs for `GetObj()` and `PutObj()`.

* Fixed a bug regarding setting TaskIds on the client.

* ** Other Changes **

* Removed deprecated `ReplaceRoles()` method.
Expand Down
4 changes: 3 additions & 1 deletion statement.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
package aerospike

import (
"math"

xornd "github.com/aerospike/aerospike-client-go/types/rand"
)

Expand Down Expand Up @@ -87,6 +89,6 @@ func (stmt *Statement) IsScan() bool {
// Always set the taskId client-side to a non-zero random value
func (stmt *Statement) setTaskId() {
for stmt.TaskId == 0 {
stmt.TaskId = xornd.Int64()
stmt.TaskId = int64(math.Abs(float64(xornd.Int64())))
}
}

0 comments on commit 01b7c7b

Please sign in to comment.