Skip to content

Fix device init messages w/ multiple clients - #11930

Merged
maloel merged 8 commits into
realsenseai:ddsfrom
maloel:dds
Jun 21, 2023
Merged

maloel merged 8 commits into
realsenseai:ddsfrom
maloel:dds

Conversation

@maloel

@maloel maloel commented Jun 21, 2023

Copy link
Copy Markdown
Contributor
  • added unit-test in test-device-init:
    • initializes multiple clients all at once in different processes - this makes them happen simultaneously and failed
  • ignore init messages after init
  • stop init loop once done
  • ignore init messages if we're still waiting for a device-header
    • i.e., before we get the device-header, we ignore already in-progress init sequences

and:

  • improve exception handling in rspy.test
  • add pyrealdds.device_server.publish_notification()
  • improve docs for device initialization, to cover "atomic" initialization

Tracked on [LRS-797]

@maloel
maloel requested a review from OhadMeir June 21, 2023 04:55

Only one set of initialization messages can be sent at a time. I.e., if a new client is detected while initialization messages for a previous client are still outgoing, a new set of messages must go out but only once the previous set is finished.

While a set of initialization messages are outgoing, all other notifications must take a back seat and wait until the set is written out.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that it is more important to send notifications to existing client than to new clients.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, current implementation writes all notification messages as a block of messages, other messages will be written after the block

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, but I don't think it's any big or long ask to send the init messages as one set without other messages interspersed in-between. It's how the current adapter/notification-server behaves.

@OhadMeir OhadMeir left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@maloel
maloel merged commit 59819ef into realsenseai:dds Jun 21, 2023
@maloel
maloel deleted the dds branch June 21, 2023 08:21
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.

2 participants