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: batches failed to be sent to data plane #367

Conversation

desusai7
Copy link
Contributor

@desusai7 desusai7 commented Dec 6, 2023

fix: batches failed to be sent from the mobile SDKs

Due to a race condition occurring when events are triggered from another thread while the SDK is getting initialized, the generated event payloads are missing anonymousId, context, & userId.

These events were causing the requests made to the /batch endpoint of the data plane to fail with an error message: Request neither has anonymousId nor userId.

Hence, to fix this issue, we made the RudderClient class thread-safe and added the capability to delete invalid events from the DB when we receive Request neither has anonymousId nor userId from the data plane.

Type of change

  • 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

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added unit tests for the code
  • I have made corresponding changes to the documentation

Copy link

sonarqubecloud bot commented Dec 6, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@desusai7 desusai7 requested a review from itsdebs December 7, 2023 11:01
@desusai7 desusai7 merged commit 2a04e28 into develop Dec 13, 2023
8 checks passed
@desusai7 desusai7 deleted the feature/sdk-965-batches-failed-to-be-sent-from-the-mobile-sdks branch December 13, 2023 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants