Skip to content

Conversation

vyavdoshenko
Copy link
Contributor

Follow-up: #5886

Introduces DbSlice::DelMutable() method to encapsulate the common pattern of running post_updater.Run() before deleting a key after FindMutable().

Note:
list_family.cc was not refactored as it uses a different pattern where deletion is conditional based on whether the list becomes empty, not unconditional.

Related to #5316

@BorysTheDev
Copy link
Contributor

LGTM

Copy link
Contributor

@dranikpg dranikpg left a comment

Choose a reason for hiding this comment

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

You don't need to pass it by reference - ending its lifetime is more "idiomatically" correct. It's always the final action.

@vyavdoshenko
Copy link
Contributor Author

You don't need to pass it by reference - ending it's lifetime is more "idiomatically" correct. It's always the final action.

Fixed

@vyavdoshenko vyavdoshenko requested a review from dranikpg October 7, 2025 11:42
@vyavdoshenko vyavdoshenko enabled auto-merge (squash) October 7, 2025 11:53
@vyavdoshenko vyavdoshenko merged commit d584381 into main Oct 7, 2025
10 checks passed
@vyavdoshenko vyavdoshenko deleted the bobik/delmutable_refactoring branch October 7, 2025 12:57
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.

3 participants