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(que): Fix bulk_enqueue when enqueuing more than 5 jobs #1

Merged
merged 1 commit into from
Jul 18, 2024

Conversation

laurglia
Copy link
Collaborator

Previously, with Que bulk_enqueue a new span was created for every job in the batch.

For each such span, a tag was added to all jobs in the batch. This meant that if you enqueued 3 jobs, then 3 spans were created and each job had 3 tags pointing to 3 different spans.

This behavior became problematic when you tried to insert more than 5 jobs, as Que supports up to 5 tags per job. More specifically, a runtime error was raised by Que.

This commit fixes that bug by creating only a single span when using bulk_enqueue.

@laurglia laurglia requested review from indrekj and j-asser July 17, 2024 13:30
@laurglia
Copy link
Collaborator Author

Also created PR to the source repository: open-telemetry#1074

Previously, with Que `bulk_enqueue` a new span was created for every job
in the batch.

For each such span, a tag was added to _all_ jobs in the batch. This
meant that if you enqueued 3 jobs, then 3 spans were created and each
job had 3 tags pointing to 3 different spans.

This behavior became problematic when you tried to insert more than 5
jobs, as Que supports up to 5 tags per job. More specifically, a runtime
error was raised by Que.

This commit fixes that bug by creating only a single span when using
bulk_enqueue.
@laurglia
Copy link
Collaborator Author

!merge

@sm-deployer sm-deployer merged commit 12068d3 into main Jul 18, 2024
1 check passed
@sm-deployer sm-deployer deleted the fixbulkenqueue branch July 18, 2024 07:36
@indrekj indrekj restored the fixbulkenqueue branch July 18, 2024 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants