Skip to content

Conversation

@sciascid
Copy link
Contributor

@sciascid sciascid commented Aug 27, 2025

Refactor processAppendEntry. Separate commits to simplify review, may be squashed later on.

Signed-off-by: Daniele [email protected]

@sciascid sciascid force-pushed the refactor-process-append-entry branch from 720f1d8 to e83a660 Compare August 27, 2025 14:10
@sciascid sciascid marked this pull request as ready for review August 27, 2025 15:19
@sciascid sciascid requested a review from a team as a code owner August 27, 2025 15:19
Copy link
Member

@MauriceVanVeen MauriceVanVeen left a comment

Choose a reason for hiding this comment

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

LGTM

@sciascid sciascid force-pushed the refactor-process-append-entry branch from e83a660 to 9c2a14f Compare September 1, 2025 07:07
Copy link
Member

@neilalexander neilalexander left a comment

Choose a reason for hiding this comment

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

Possible to rebase on latest main and squash down to one commit please?

@sciascid sciascid force-pushed the refactor-process-append-entry branch from 9c2a14f to eedb125 Compare September 9, 2025 14:21
@sciascid
Copy link
Contributor Author

sciascid commented Sep 9, 2025

Possible to rebase on latest main and squash down to one commit please?

Done

Extract recoverAppendEntry() from processAppendEntry(),
separating the normal path from recovery path. This allows
to simplify processAppendEntry() by removing checks for
for `sub == nil`, as subscription is always given

Extract processAppendEntryLocked() from processAppendEntry().
processAppendEntryLocked() does the actual processing of the
appendEntry under lock protection, and optionally returns a
pointer to a appendEntryResponse. processAppendEntry() is
responsible for sending the response and returning it to its
pool (if any).

Signed-off-by: Daniele Sciascia <[email protected]>
@sciascid sciascid force-pushed the refactor-process-append-entry branch from eedb125 to acb54f1 Compare September 9, 2025 14:26
@neilalexander neilalexander added the post-freeze We'll come back to this after the freeze period label Sep 11, 2025
@sciascid sciascid requested a review from a team as a code owner October 1, 2025 14:04
@sciascid sciascid force-pushed the refactor-process-append-entry branch from 705d478 to 98bac1f Compare October 1, 2025 14:14
Remove sub parameter from processAppendEntry, appendEntry
already stores sub.

Move all subscription pointer comparisons from processAppendEntryLocked
to processAppendEntry. processAppendEntryLocked takes now a boolean
instead of a subscription pointer.

Signed-off-by: Daniele Sciascia <[email protected]>
@sciascid sciascid force-pushed the refactor-process-append-entry branch from 98bac1f to 134258f Compare October 1, 2025 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

post-freeze We'll come back to this after the freeze period

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants