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

[SW-581] Refactor processInstantOutbox to use monitor with hint #31

Conversation

kgiannakelos
Copy link
Contributor

@kgiannakelos kgiannakelos commented Sep 2, 2024

Description

✨ Features

  • Adds instantOrderingEnabled flag

    Flag which indicates whether new instant processing mechanism should be used or not.

    The new mechanism uses monitor to fetch the item along with its group sibling items and support their ordering
    while the old mechanism processes the instant outbox item directly without fetching it from store.

    One downside of the new mechanism is that the advisory locks will be used more frequently which may result
    some delays on the monitor executions.

    Both mechanisms will be kept and switch via this flag until the old one eventually gets dropped.

♻️ Refactoring

  • Refactors processInstantOutbox to use monitor with hint

    This is required in order to be able to execute all items that potentially belong to the same group as the one being instantly processed.

    Since hint (outbox id) is passed through the filter, clients can manipulate how the item is retrieved via fetch. To ensure
    that we execute only this item in case of an erroneous fetch implementation, we also filter it on runtime.

    Also added @Deprecated since this method will eventually be dropped in favor of directly using monitor with a hint.

⬆️ Version

  • Bumps core lib version to 2.2.0

Resolves [SW-581]

@kgiannakelos kgiannakelos changed the title WIP - SW-581: Refactor processInstantOutbox to use monitor with hint WIP - SW-581 Refactor processInstantOutbox to use monitor with hint Sep 2, 2024
@kgiannakelos kgiannakelos changed the title WIP - SW-581 Refactor processInstantOutbox to use monitor with hint WIP - [SW-581] Refactor processInstantOutbox to use monitor with hint Sep 2, 2024
@kgiannakelos kgiannakelos force-pushed the chore/sw-581-refactor-instant-processing-to-use-standard-processing-flow branch 2 times, most recently from 036b452 to f3642cf Compare September 3, 2024 20:28
@kgiannakelos kgiannakelos changed the title WIP - [SW-581] Refactor processInstantOutbox to use monitor with hint [SW-581] Refactor processInstantOutbox to use monitor with hint Sep 3, 2024
@kgiannakelos kgiannakelos marked this pull request as ready for review September 3, 2024 21:09
@kgiannakelos kgiannakelos marked this pull request as draft September 3, 2024 21:11
@kgiannakelos kgiannakelos force-pushed the chore/sw-581-refactor-instant-processing-to-use-standard-processing-flow branch from f3642cf to 1c63062 Compare September 4, 2024 08:11
@kgiannakelos kgiannakelos requested review from a team and chris-asl September 4, 2024 19:42
@kgiannakelos kgiannakelos self-assigned this Sep 4, 2024
@kgiannakelos kgiannakelos marked this pull request as ready for review September 4, 2024 19:42
@kgiannakelos kgiannakelos force-pushed the chore/sw-581-refactor-instant-processing-to-use-standard-processing-flow branch 3 times, most recently from 45c14be to 92d80e8 Compare September 6, 2024 07:45
Copy link
Collaborator

@panos-tr panos-tr left a comment

Choose a reason for hiding this comment

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

Nice work!!
Great, great description!! 👏 👏

Flag which indicates whether new instant processing
mechanism should be used or not.

The new mechanism uses `monitor` to fetch the item along
with its group sibling items and support their ordering
while the old mechanism processes the instant outbox item
directly without fetching it from store.

One downside of the new mechanism is that the advisory
locks will be used more frequently which may result
some delays on the monitor executions.

Both mechanisms will be kept and switch via this flag
until the old one eventually gets dropped.

[SW-581]
@kgiannakelos kgiannakelos force-pushed the chore/sw-581-refactor-instant-processing-to-use-standard-processing-flow branch from 92d80e8 to 36e40bd Compare September 6, 2024 18:28
This is required in order to be able to execute all items that
potentially belong to the same group as the one being instantly
processed.

Since hint (outbox id) is passed through the filter, clients
can manipulate how the item is retrieved via `fetch`. To ensure
that we execute only this item in case of an erroneous fetch
implementation, we also filter it on runtime.

Also added `@Deprecated` since this method will eventually be
dropped in favor of directly using monitor with a hint.

[SW-581]
Ensures that instant outbox items are picked up
by monitor's fetching.

[SW-581]
@kgiannakelos kgiannakelos force-pushed the chore/sw-581-refactor-instant-processing-to-use-standard-processing-flow branch from 000f593 to 70dd34c Compare September 12, 2024 14:00
@kgiannakelos kgiannakelos merged commit 47158cb into main Sep 12, 2024
1 check passed
@kgiannakelos kgiannakelos deleted the chore/sw-581-refactor-instant-processing-to-use-standard-processing-flow branch September 12, 2024 14:02
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