Transaction log follower logs an error for every transaction deleted from the files log
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
Research direction
Start by reading TransactionLogTransactionStack to find the follower's DynamoEventSource configuration, then check DynamoDBStreamTransactionLogEntryMapper and DynamoDBStreamTransactionLogEntryMapperTest. Filter the follower to INSERT events and cover a REMOVE record in the mapper test; the issue says non-INSERT records should be skipped without ERROR logs.
Written by the indexing model from the issue text.
Description
Description / Background
The transaction log follower lambda reads the DynamoDB Stream on the files transaction log table. The event source has no filter, so it also receives REMOVE records whenever transactions are deleted. This happens when the transaction deletion lambda runs, or when a table is cleared or deleted.
The stream view type is NEW_IMAGE, so a REMOVE record has no new image. DynamoDBStreamTransactionLogEntryMapper assumes every record has one and throws a NullPointerException. The exception is caught, the record is skipped, and an ERROR is logged with a stack trace.
Skipping the record is correct, but every deleted transaction produces an ERROR log that hides real errors. The follower is also invoked for batches with nothing to process.
Steps to reproduce
- Deploy an instance and ingest data into a table.
- Wait for the transaction deletion lambda to delete old transactions, or delete the table.
- The follower's log group has an ERROR
Unable to map to transaction log entrywith aNullPointerExceptionfor each deleted transaction.
Expected behaviour
The follower only receives INSERT records, and any other record is skipped without an ERROR log.
Technical Notes / Implementation Details
- In
TransactionLogTransactionStack, filter the follower'sDynamoEventSourcetoeventName = INSERT. Log items are never updated, so nothing is lost. - As a fallback, have
DynamoDBStreamTransactionLogEntryMapperskip non-INSERT records at DEBUG level. - Add a test to
DynamoDBStreamTransactionLogEntryMapperTestfor a REMOVE record.
- 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
-
bug size:medium
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
Similar issues
-
面渣逆袭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 78/100
johanhaleby/occurrent#1462 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
SasanLabs/VulnerableApp#912 ·
Maintainers usually reply within 1 day
-
area/build area/events area/storage area/storage/kafkasql area/storage/sql
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Apicurio/apicurio-registry#11079 ·
Maintainers usually reply within 1 day