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

Maintaining thread safety for class med properties #2207

Merged
merged 1 commit into from
Jul 25, 2024

Commits on Jul 25, 2024

  1. Maintaining thread safety for class med properties

    Since expressions such as expression="get-property('...')" or expression="$trp:..."
    are dynamic and their values can change with each request, we face a potential
    race condition when these expressions alter instance variables using setters.
    Given that only one instance of the class mediator is created and shared among multiple
    concurrent requests, this shared state can lead to inconsistent behavior and
    data corruption.
    To mitigate this, we need to ensure synchronization not only when the content
    is altered by expression but also for each evaluation of these dynamic expressions. This ensures
    that changes made by one request do not interfere with or get overwritten by
    another concurrent request, maintaining thread safety and data integrity across all operations.
    
    Fixes: wso2/product-ei#5292
    malakaganga committed Jul 25, 2024
    Configuration menu
    Copy the full SHA
    a62a96b View commit details
    Browse the repository at this point in the history