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

Fix Native Data Retention Issue #196

Merged
merged 6 commits into from
Oct 12, 2023

Conversation

RDPerera
Copy link
Member

Description

The issue has been resolved by placing the Java-side message object as the native data within the message itself, rather than associating it with a receiver client. This way, the garbage collector will take care of cases involving data that is not handled(data that didn't go through a completion, abandonment, or movement to the dead letter queue).

Fixes Data Retention Issue

Related Pull Requests (remove if not relevant)

One line release note:

  • Fix Native Data Retention Issue

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

JProfiler Screen Record

The new solution was tested by sending large messages over an extended period of time without handling them through the testing application. Subsequently, an analysis of memory usage and garbage collection behavior was conducted using JProfiler. As indicated in above figure, it was observed that the garbage collector successfully cleaned up the unhandled messages after period of time.

ballerina/receiver.bal Outdated Show resolved Hide resolved
@RDPerera RDPerera self-assigned this Sep 18, 2023
@RDPerera RDPerera removed their assignment Sep 18, 2023
ayeshLK
ayeshLK previously approved these changes Sep 18, 2023
Copy link
Member

@ayeshLK ayeshLK left a comment

Choose a reason for hiding this comment

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

LGTM

@RDPerera RDPerera dismissed stale reviews from NipunaRanasinghe and ayeshLK via 925c2c3 September 19, 2023 08:25
@ayeshLK ayeshLK merged commit d0b8b8d into ballerina-platform:main Oct 12, 2023
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.

[Bug]: Native Data Retention Issue Causing Memory Leak in Azure Service Bus Ballerina Connector
3 participants