Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Frames and User Image Invalidation #1604

Open
wants to merge 40 commits into
base: master
Choose a base branch
from

Conversation

mikeb01
Copy link
Contributor

@mikeb01 mikeb01 commented May 24, 2024

  • Support the ability to allow a user to invalidate an image within a subscription.

@mikeb01 mikeb01 changed the title User Image Invalidation Error Frames and User Image Invalidation Jun 13, 2024

public void onPublicationError(final PublicationErrorFrame errorFrame)
{
errorFrameQueue.offer(errorFrame.clone());

Check notice

Code scanning / CodeQL

Ignored error status of call Note

Method onPublicationError ignores exceptional return value of OneToOneConcurrentArrayQueue.offer.
…ode. Prevent new data being inserted into an invalidated image. Add logging.
…e is found during invalidation on the receiver.
… have it disconnect. Allow receiver side image to linger to prevent immediately recreation of the image. Treat errors received by the NetworkPublication to behaviour like end of stream messages.
… Check that we don't spam out error messages too quickly. Reset timestamp of last SM sent by the publication image when sending errors.
…eck that we don't spam out error messages too quickly. Reset timestamp of last SM sent by the publication image when sending errors.
*/
public static final int MAX_ERROR_MESSAGE_LENGTH = 1023;

public static final int MAX_ERROR_FRAME_LENGTH = HEADER_LENGTH + MAX_ERROR_MESSAGE_LENGTH;
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing javadoc

*/
public String errorMessage()
{
return getStringUtf8(ERROR_STRING_FIELD_OFFSET);
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be better to treat encoded strings at US_ASCII as this is consistent elsewhere and ports to C.

/**
* A count of the number of error frames received by this driver.
*/
ERROR_FRAMES_RECEIVED(38, "Error Frames received");
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we have a corresponding error frames sent counter?

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.

None yet

4 participants