Skip to content

Commit

Permalink
refactor(journal): Change order between cleanPosition and `bytesCon…
Browse files Browse the repository at this point in the history
…sumed`
  • Loading branch information
symbiont-daniel-gustafsson committed Mar 9, 2022
1 parent 5c1ed8c commit 4adbdc9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/journal/src/Journal/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ data JMetadata = JMetadata
-- mdMTULength :: Int32, only needed if we want to fragment large messages...
, mdTermLength :: Int32
, mdPageSize :: Int32
, mdBytesConsumed :: Int64
, mdCleanPosition :: Int64
, mdBytesConsumed :: Int64
-- padding
-- , mdDefaultFrameHeader :: Bytestring???
}
Expand All @@ -100,14 +100,14 @@ lOG_PAGE_SIZE_OFFSET :: Int
lOG_PAGE_SIZE_OFFSET = lOG_TERM_LENGTH_OFFSET +
sizeOf (4 :: Int32)

lOG_BYTES_CONSUMED_OFFSET :: Int
lOG_BYTES_CONSUMED_OFFSET = lOG_PAGE_SIZE_OFFSET + sizeOf (4 :: Int32)

lOG_CLEAN_POSITION_OFFSET :: Int
lOG_CLEAN_POSITION_OFFSET = lOG_BYTES_CONSUMED_OFFSET + sizeOf (8 :: Int)
lOG_CLEAN_POSITION_OFFSET = lOG_PAGE_SIZE_OFFSET + sizeOf (4 :: Int32)

lOG_BYTES_CONSUMED_OFFSET :: Int
lOG_BYTES_CONSUMED_OFFSET = lOG_CLEAN_POSITION_OFFSET + sizeOf (8 :: Int)

lOG_META_DATA_LENGTH :: Int
lOG_META_DATA_LENGTH = lOG_CLEAN_POSITION_OFFSET + sizeOf (8 :: Int) -- is this correct?
lOG_META_DATA_LENGTH = lOG_BYTES_CONSUMED_OFFSET + sizeOf (8 :: Int) -- is this correct?

------------------------------------------------------------------------

Expand Down

0 comments on commit 4adbdc9

Please sign in to comment.