Skip to content

feat(pj_base): add DatasetDescriptor::requested_id for streaming lockstep#115

Closed
pabloinigoblasco wants to merge 1 commit into
mainfrom
feat/dataset-descriptor-requested-id
Closed

feat(pj_base): add DatasetDescriptor::requested_id for streaming lockstep#115
pabloinigoblasco wants to merge 1 commit into
mainfrom
feat/dataset-descriptor-requested-id

Conversation

@pabloinigoblasco

Copy link
Copy Markdown
Collaborator

Summary

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.

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 DatasetId as 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 later createDataset on each engine would yield two different ids and the two engines would key the dataset differently.

The consuming side (DataEngine::createDataset honouring requested_id, plus the parallel TopicDescriptor::requested_id field 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

  • One header change in pj_base/include/pj_base/dataset.hpp (+6 lines).
  • Field is additive and default-zero: no existing callsite needs to change.
  • No ABI break (struct grows by one DatasetId at the end; layout of existing fields unchanged).

Test plan

  • CI green on all matrix jobs (header-only change; build only).
  • PlotJuggler/PJ4#145 builds clean once this lands and the SDK Conan recipe is bumped.

…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).
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.

1 participant