lola: Preparation for moving TransactionLogLocalView#299
Draft
lola: Preparation for moving TransactionLogLocalView#299
Conversation
These Impl classes were previously added to avoid having to change calling code to explicitly use the default template argument (i.e. EventSubscriptionControl<>). Using the explicit template argument makes the code more explicit and also removes the additional code complexity of having the alias and Impl class.
We remove noexcept from all signatures to allow us to use precondition violation tests instead of death tests. Precondition tests are orders of magnitude faster than death tests due to not having to fork a process and also don't have issues associated with RAII objects being destroyed twice (i.e. in forked process and main process).
We now return a struct instead of a pair. This makes it easier to add additional return types in future (we will soon return a reference to a TransactionLogSet as well) and also makes it clearer on caller side as they can access members using the names defined in the struct rather than .first / .second. We also return a reference to EventDataStorage instead of a pointer, since it should always be created.
Updated documentation of functions and general clean up of functions.
We use ScopeExit so that we can rely only the more complicated testing of move construction / move assignment from the ScopeExit class.
This change will be needed in an upcoming PR in which TransactionLogSet::Register() creates a TransactionLogRegistrationGuard. Both of thes files will need TransactionLogIndex so to avoid cyclic dependencies we extract TransactionLogIndex into a separate file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.