rudderlabs / rudder-sdk-android

Android SDK for RudderStack - the Customer Data Platform for Developers.
https://www.rudderstack.com
Other
18 stars 29 forks source link

fix: batches failed to be sent to data plane #367

Closed desusai7 closed 9 months ago

desusai7 commented 9 months ago

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

sonarcloud[bot] commented 9 months ago

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