In this article, I show you an insight into the internals of Journal Metadata and its index.
Location
Each journal record is identified by its location which consists of the data file Id, offset, size of the journal record and its type. Offset is measured from the beginning of the data file.
If we know the data file Id and offset, we can move the file pointer to the offset and read the next two components which are size and type. Size includes the record header and the data length.
Stored Destination
Journal Metadata
Metadata sits in the first page of the index file. It holds the destinations page Id where the destination indexes are stored.