-
Notifications
You must be signed in to change notification settings - Fork 181
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(storage-manager):
LogLatest::lookup
-> lookup_newer
This commit optimises the method `lookup` to only lookup for newer (and thus rename it to `lookup_newer`) Event. As it is only looking for a newer Event, this method skips the Intervals and SubIntervals that, by construction of the Replication Log, only contain Events with lower timestamps. * plugins/zenoh-plugin-storage-manager/src/replication/classification.rs: - Added new enumeration `EventLookup`. - Removed the `Interval::lookup` method as this commit made it unneeded. - Updated the `SubInterval::lookup` method to return the newly created `EventLookup` enumeration. * plugins/zenoh-plugin-storage-manager/src/replication/core/aligner_reply.rs: - Removed the code to filter out an Event with an older timestamp as the method `LogLatest::lookup_newer` already does it. - Create the `EventMetadata` before calling `LogLatest::remove_event` to avoid multiple borrows. * plugins/zenoh-plugin-storage-manager/src/replication/log.rs: renamed the method `LogLatest::lookup` to `LogLatest::lookup_newer` and modified its behaviour to only look for newer Event. * plugins/zenoh-plugin-storage-manager/src/storages_mgt/service.rs: only test if `LogLatest::lookup_newer` returned something. Signed-off-by: Julien Loudet <julien.loudet@zettascale.tech>
- Loading branch information
Julien Loudet
committed
Oct 28, 2024
1 parent
dd12d95
commit 9b5c1d6
Showing
4 changed files
with
87 additions
and
34 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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