Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content

Resolve "xadd and get_last are not serialized / de-serialized"

Description

Delegate the work of parsing BECMessage header to the BEC msgpack decoder. Like this we can call MsgpackSerialization.loads() on any msgpack-encoded string -> makes it easier to implement the requested feature:

  • xadd has been modified to encode data using MsgpakSerialization.dumps()
  • xread, get_last have been modified to decode data using MsgpackSerialization.loads()
  • pipe keyword argument cannot be used anymore when deserializing (xread, get_last), since the return values from Redis are special it makes it difficult to handle this properly (as it is not just BECMessage or values, but a mix of dict and lists and values, including BECMessage) - are pipelines and xread, get_last really needed? Don't think so

Tests have been adapted to changes, and a new test has been added to xadd/get_last a BECMessage.

Note: it seems to me the special ID $ can be used to replace the costly round-trip to redis to get the latest generated index. So I changed that too.

Closes #186 (closed)

Edited by guijar_m

Merge request reports