Skip to content

wal review? - #629

Open
samliok wants to merge 3 commits into
GCfrom
struct-remove
Open

samliok wants to merge 3 commits into
GCfrom
struct-remove

Conversation

@samliok

@samliok samliok commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

I really think adding the epoch aware wal in the way we do makes things too complex. Its an additional 250 lines of code plus we need to wrap the WAL when we initialize the epoch. We also need to update the instance code just to support this new wal too.

This PR has two commits

The first removes the epoch wal and has very simple logic to read the correct records from the wal.
The second commit removes the logic from the epoch into its own testable function, that IMO is just as testable as EpochAwareWal but has a smaller surface area for bugs.
The third commit is some more simplifications we can do

Comment thread simplex/epoch_test.go
require.NoError(t, e.Start())

md := e.Metadata()
require.Equal(t, uint64(5), md.Epoch)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test doesn't test that we haven't loaded the stale block into the memory. It just tests that if we propose a block, we will propose it with the right epoch.

@yacovm

yacovm commented Oct 18, 2026

Copy link
Copy Markdown
Collaborator

I think it's much more easier to review a new PR that adds the garbage collected WAL instead of fixing the existing code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants