Queries can fail in the AWS SQS/lambda integration poller, and are never retried
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- aws, java
- Domain
- backend, cloud, distributed-systems
Research direction
Look at QueryQueueStack and QueryStack to understand the SQS queue configuration with maxReceiveCount. Examine the query processing lambda integration and the failure tracking mechanism. The goal is to modify the system to detect and record queries that fail before lambda invocation, possibly by adding dead-letter queues and a failure tracking lambda.
Written by the indexing model from the issue text.
Description
Description / Background
In the nightly test suite last night MultipleTablesST failed because one of 200 queries was lost in the AWS poller before it was ever delivered to the query processing lambda. We've got maxReceiveCount set to 1 for the query queues, which also includes failures in the AWS infrastructure for the SQS/lambda integration. The SQS metrics show 200 messages sent, 200 received but only 199 deleted, and there were only 199 invocations of the lambda.
Steps to reproduce
- Run MultipleTablesST, or make a lot of queries over a long period.
- Occasionally, a query is dropped and not processed.
- The SQS metrics show a message was received but not deleted.
- The query processing lambda was not invoked.
Expected behaviour
When a query fails it should be recorded in the query tracker.
Ideally queries should be retried if a recoverable failure occurs. This may be a difficult distinction to make, because there are other cases where a retry would be a waste of time. For example, for a web socket query the client may go away, or not be able to process the results. In that case the query will fail, but cannot be effectively retried.
It might be better to severely limit our use of retries, to avoid wasted compute and confusion about why a retried query was slow.
In the case where a query failed before ever invoking the lambda, if we can detect that specifically we might want to retry for just that case.
Technical Notes / Implementation Details
QueryQueueStack and QueryStack set maxReceiveCount(1) for both query queues.
It would help to add intermediate queues for dead letters to ensure they're recorded, both for parent queries and subqueries. An extra failure tracking lambda could record the failure in the query tracker if it hasn't already been recorded.
We could consider how the failure tracking lambda could detect the case where a query failed before ever invoking the lambda.
- Dominant language
- Java
- Stars
- 107
- Forks
- 29
- Avg merge
- 1d 33m
- Merged PRs (30d)
- 115
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from gchq/sleeper
-
enhancement scripts
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
EMR executor market type is not validated and any value other than ON_DEMAND is treated as SPOTOpenbug bulk-import-module
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
bug needs-refinement under-discussion
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
gchq/sleeper#8632 · 1 comment ·
Maintainers usually reply within 1 day
-
bug needs-refinement under-discussion
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Transaction log follower logs an error for every transaction deleted from the files logPossibly taken @ca61688 claimed this 1 day ago. Openbug size:small
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
gchq/sleeper#8624 · 2 comments · 1 assignee ·
Maintainers usually reply within 1 day
Similar issues
-
Type: Bug
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
MovingBlocks/Terasology#5415 ·
-
type: possible bug
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
-
面渣逆袭Spring事务传播机制勘误Open
Difficulty 1/5 Under an hour Newbie friendliness 80/100
itwanger/toBeBetterJavaer#218 ·
-
Markdown and Astro language servers do not start when the project path contains a non-ASCII character or a spacePossibly taken @RoiSoleil claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
eclipse-wildwebdeveloper/wildwebdeveloper#2277 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
openrewrite/rewrite-spring#1286 ·
Maintainers usually reply within 1 day