Skip to content

Commit d37e9b5

Browse files
lockeroleg-jukovec
authored andcommitted
queue: encode UUID argument of identify() as string instead of binary
The identify() function expects the UUID argument to be a plain string while the go connector encodes it in MsgPack as a binary blob (MP_BIN). This works fine for now because Tarantool stores MP_BIN data in a string when decoded to Lua but this behavior is going to change soon: we're planning to introduce the new Lua type for binary data and update the MsgPack decoder to store MP_BIN data in a varbianry object instead of a plain string. Let's prepare for that by converting the UUID data to a string before encoding. Needed for tarantool/tarantool#1629 (cherry picked from c2498be)
1 parent d2b2b0a commit d37e9b5

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ Versioning](http://semver.org/spec/v2.0.0.html) except to the first release.
1212

1313
### Changed
1414

15+
- Change encoding of the queue.Identify() UUID argument from binary blob to
16+
plain string. Needed for upgrade to Tarantool 3.0, where a binary blob is
17+
decoded to a varbinary object (#313).
18+
1519
### Fixed
1620

1721
- Flaky decimal/TestSelect (#300)

queue/queue.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ func (q *queue) Identify(u *uuid.UUID) (uuid.UUID, error) {
232232
if bytes, err := u.MarshalBinary(); err != nil {
233233
return uuid.UUID{}, err
234234
} else {
235-
args = []interface{}{bytes}
235+
args = []interface{}{string(bytes)}
236236
}
237237
}
238238

0 commit comments

Comments
 (0)