feat(pj_base): add DatasetDescriptor::requested_id for streaming lockstep#115
Closed
pabloinigoblasco wants to merge 1 commit into
Closed
feat(pj_base): add DatasetDescriptor::requested_id for streaming lockstep#115pabloinigoblasco wants to merge 1 commit into
pabloinigoblasco wants to merge 1 commit into
Conversation
…step Add an optional `requested_id` field to DatasetDescriptor. When non-zero, the engine creates the dataset with that exact DatasetId (failing if it is already in use and advancing the counter past it); zero keeps the previous auto-assign behaviour, so existing callers are unaffected. This is the SDK half of the streaming secondary-engine id desync fix: the lockstep mirror needs to give the secondary engine the SAME DatasetId as the primary even when their id counters have drifted (e.g. a file loaded between two streams advanced only the primary's counter). The consuming side -- DataEngine::createDataset honouring requested_id, plus the parallel TopicDescriptor::requested_id and the streaming source manager wiring -- lives in the app repo (PlotJuggler/PJ4#145).
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.
Summary
Add an optional
requested_idfield toDatasetDescriptor. When non-zero, the engine creates the dataset with that exactDatasetId(failing if it is already in use and advancing the counter past it); zero keeps the previous auto-assign behaviour, so existing callers are unaffected.Why
This is the SDK half of a streaming secondary-engine id desync fix. The lockstep mirror needs to give the secondary engine the same
DatasetIdas the primary even when their id counters have drifted — e.g. a file loaded between two streams advances only the primary's counter, so a latercreateDataseton each engine would yield two different ids and the two engines would key the dataset differently.The consuming side (
DataEngine::createDatasethonouringrequested_id, plus the parallelTopicDescriptor::requested_idfield and the streaming source manager wiring) lives in the app repo: PlotJuggler/PJ4#145. That PR does not compile against the current public SDK because the field added here doesn't exist yet — this PR unblocks it.Scope
pj_base/include/pj_base/dataset.hpp(+6 lines).DatasetIdat the end; layout of existing fields unchanged).Test plan