chore: implement functionality to allow overriding logical time extraction during import - #70
Open
doudou wants to merge 5 commits into
Open
chore: implement functionality to allow overriding logical time extraction during import#70doudou wants to merge 5 commits into
doudou wants to merge 5 commits into
Conversation
doudou
force-pushed
the
logical_time_override
branch
2 times, most recently
from
August 6, 2026 14:40
4bb044b to
1d2093b
Compare
…ence So far, we were relying on Rock's logger::Logger being a "known quantity", that is being sure that the sample time's would be monotonic. Note that the logger's behaviour is not generally ideal: 1. a sample's realtime is the Time::now() time where it is being logged 2. a sample's logical time is the Time::now() when the logger was woken up for that particular sample Under load, it means that a few samples can actually have the same logical time. This is actually why this commit allows equal rt/lg times (since rock's base::Time has a microsecond resolution, we might sometime get some equality as well) However, monotonic time is not guaranteed anymore with the extraction of logical time from samples. We could get bugs that cause older samples to be logged again (actually happened), or the component(s) might be buggy themselves. If some components are badly written, the resulting stream might end up being simply invalid (and tooling would fail) This commit validates that all times are in sequence, rejecting samples if it is not the case. It maintains stream statistics, that get reported at the end of the stream importation, to not "hide" that fact.
…ig file One more refactor of the config file structure, but that's worth it.
doudou
force-pushed
the
logical_time_override
branch
from
August 6, 2026 20:25
1d2093b to
ee38b20
Compare
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.
This PR is meant to allow importing datasets that have problems.
With the addition of the extraction of logical time from the samples, we can have issues with non-monotonic times. Or we can find out that some samples do not have logical time fields but should.
This PR implements having a config file that allows overriding the logical time field (or removing it altogether if needed) to fix the import of such datasets. Moreover, it checks that the log file's rt/lg fields are monotonic to avoid generating invalid log files.
The config file's schema is documented (and internally validated) as json-schema