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
[x] 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
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 receiveRequest neither has anonymousId nor userId
from the data plane.Type of change
Checklist: