boostercloud / booster

Booster Framework
https://www.boosterframework.com
Apache License 2.0
409 stars 83 forks source link

Track processed events in Azure provider #1527

Closed MarcAstr0 closed 4 months ago

MarcAstr0 commented 4 months ago

Description

The changes in this PR aim to correct a behavior noticed in the Azure provider, where the Cosmos DB change feed would get triggered more than once for the same event, resulting in the same event being processed twice. This behavior has been seen to happen during load-balancing scenarios.

To correct this duplicate-event behavior, a new processed events container is added to Cosmos DB to store the IDs of events that the event processor has processed. The processor will query this container for the event IDs and verify the event has not been processed (i.e., it can't find its ID in this new processed-events container). If an event with the same ID is found, to avoid duplication, the event processor will ignore it and log a warning indicating the duplication.

The IDs store in the processed events container have a time-to-live (TTL) and will get cleared automatically.

Changes

Checks

what-the-diff[bot] commented 4 months ago

PR Summary

MarcAstr0 commented 4 months ago

/integration sha=cffd25137016b4b4eae2032990dfc81c8e8fee6f

NickSeagull commented 4 months ago

/integration sha=cffd25137016b4b4eae2032990dfc81c8e8fee6f

github-actions[bot] commented 4 months ago

:hourglass: Integration tests are running...

Check their status here πŸ‘ˆ

github-actions[bot] commented 4 months ago

:x: Oh no! Integration tests have failed

MarcAstr0 commented 4 months ago

/integration sha=cffd25137016b4b4eae2032990dfc81c8e8fee6f

github-actions[bot] commented 4 months ago

:hourglass: Integration tests are running...

Check their status here πŸ‘ˆ

github-actions[bot] commented 4 months ago

:x: Oh no! Integration tests have failed

MarcAstr0 commented 4 months ago

/integration sha=79aacd308959f34dcad0106d20bc9cb3949a3f9d

github-actions[bot] commented 4 months ago

:hourglass: Integration tests are running...

Check their status here πŸ‘ˆ

github-actions[bot] commented 4 months ago

:white_check_mark: Integration tests have finished successfully!

MarcAstr0 commented 4 months ago

@alvaroloes all of your comments have been addressed in commit 8b06598a412b227c4b93d4152d4ff6bba64a3c5a :wink: :+1:

MarcAstr0 commented 4 months ago

/integration sha=8b06598a412b227c4b93d4152d4ff6bba64a3c5a

github-actions[bot] commented 4 months ago

:hourglass: Integration tests are running...

Check their status here πŸ‘ˆ

github-actions[bot] commented 4 months ago

:white_check_mark: Integration tests have finished successfully!