Skip to content
This repository was archived by the owner on Feb 13, 2024. It is now read-only.
This repository was archived by the owner on Feb 13, 2024. It is now read-only.

Flush Race Condition #219

@thejuan

Description

@thejuan

I'm using segment inside an AWS Lambda.
At the moment we identify and track throughout the lambda then call flush at the end and wait for it to complete

When flushAt is set to 1, and we make a single identify call then we wait for flush to complete before letting the lambda finish (we thought so that all inflight requests could complete).

However flush doesn't seem to track the previous inflight flushes called internally and it returns immediately, (as in this case the queue is empty) even if a previous flush is still in progress.

If we set flushAt = 2 and make 2 track calls the same thing will happen.

Are we meant to track all calls to identify and track and wait on them manually?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions