Allows writing more than one blob of data using a single "add" call into segment. The old call sites will still just provide a single entry. To ensure we can determine the health of all the entries as a unit, we need to wrap them in a "parent" entry. For this, we bump the commitlog segment format and introduce a magic marker, which if present, means we have entries in entry, totalling "size" bytes. We checksum the entra header, and also checksum the individual checksums of each sub-entry (faster). This is added as a post-word. When parsing/replaying, if v2+ and marker, we have to read all entries + checksums into memory, verify, and _then_ we can actually send the info to caller.
2.8 KiB
2.8 KiB