featurebase/dax/computer
Travis Turner 6740bc250e
Prepend header bytes to WriteLog messages for backward compatibility (#2309)
MarshalLogMessage serializes the log message and prepends additional encoding
information to each message. Currently, we prepend three bytes to each log
message:
byte[0]: encodeVersion - this is currently a constant within the code. If we
modify structs such that they encode differently, we'll have to change the
constant and keep previous versions of structs for deserialization.
byte[1]: encodeType (e.g. "json", etc.)
byte[2]: logMessageType

If we get into a situation where we want more flexibility in these message
header bytes—for example, if we want to use more than three bytes—we could do
something with the first bit of the encodeVersion: if it's 1, that could
indicate that there are additional header bytes, and the following seven bits
could indicate how many.
2022-11-22 15:20:47 -06:00
..
alpha Prepend header bytes to WriteLog messages for backward compatibility (#2309) 2022-11-22 15:20:47 -06:00
api Add DAX - full list of squashed commits below 2022-11-16 11:19:40 -06:00
computer.go Add DAX - full list of squashed commits below 2022-11-16 11:19:40 -06:00
snapshot.go Add DAX - full list of squashed commits below 2022-11-16 11:19:40 -06:00
writelog.go Prepend header bytes to WriteLog messages for backward compatibility (#2309) 2022-11-22 15:20:47 -06:00
writelog_test.go Prepend header bytes to WriteLog messages for backward compatibility (#2309) 2022-11-22 15:20:47 -06:00