Skip to content

[BUG] dynamodb source hangs if initial OCUs are not enough in AWS ingestion pipeline #3914

Description

@jonparker

Describe the bug

AWS Opensearch Ingestion pipeline with DynamoDB

  1. DynamoDB export
  2. DynamoDB stream
  3. Opensearch sink
  4. DDB table more than 1.7 gigabytes with 2.1m records
  5. Issue: No records are sent to the sink and stopping and increasing the OCU min and max does not fix the issue.

The pipeline circuit breaker flips open and closed.

2024-01-04T01:29:28.016 [pool-3-thread-1] INFO  org.opensearch.dataprepper.breaker.HeapCircuitBreaker - Circuit breaker tripped and open. 6442470568 used memory bytes > 6442450944 configured

2024-01-04T01:29:30.342 [pool-3-thread-1] INFO  org.opensearch.dataprepper.breaker.HeapCircuitBreaker - Circuit breaker closed. 6423596448 used memory bytes <= 6442450944 configured

After stopping the pipeline and re-configuring it to have more min and max OCUs (6-10 Ingestion-OCU) the flip flop of the circuit breaker no longer happens but it gets stuck trying to process the shards and continuously reports 0 shards found or no shards acquired.

2024-01-04T05:58:20.517 [pool-13-thread-1] INFO  org.opensearch.dataprepper.plugins.source.dynamodb.leader.ShardManager - Listing shards (DescribeStream call) took 25 milliseconds with 0 shards found

2024-01-04T05:58:41.941 [pool-13-thread-4] INFO  org.opensearch.dataprepper.plugins.source.dynamodb.stream.StreamScheduler - No new shards acquired after 250 attempts. This means that all shards are currently being consumed, or that the export is still in progress. New shards will not be consumed until the export is fully processed.

To Reproduce
Steps to reproduce the behavior:

  1. Create DDB table with 1.7 gigabytes of data and 2.1m records.
  2. Create pipeline with min OCUs of 1 and max OCUs of 4:
version: "2"
dynamodb-pipeline:
  source:
    dynamodb:
      tables:
        - table_arn: 'arn:aws:dynamodb:us-east-2:123456789:table/MyTable'
          stream:
            start_position: "LATEST"
          export:
            s3_bucket: "opensearch-ingestion"
            s3_region: "us-east-2"
            s3_prefix: "export/"
      aws:
        sts_role_arn: "arn:aws:iam::123456789:role/opensearch-ingestion-pipeline"
        region: "us-east-2"
  sink:
    - opensearch:
        hosts:
          [
            "https://123456789.us-east-2.aoss.amazonaws.com"
          ]
        index: "mytableindex"
        index_type: "custom"
        document_id: "${getMetadata(\"primary_key\")}"
        action: "${getMetadata(\"opensearch_action\")}"
        document_version: "${getMetadata(\"document_version\")}"
        document_version_type: "external"
        aws:
          sts_role_arn: "arn:aws:iam::123456789:role/opensearch-ingestion-pipeline"
          region: "us-east-2"
          serverless: true
          network_policy_name: "easy-my-data"

Expected behavior
The pipeline recovers and processes all records.

Environment (please complete the following information):

  • OS: AWS Opensearch ingestion pipeline
  • Version: 2 created on Jan 4th 2024 so assuming it will be the latest 2.x as at that date.

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions