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

Improve logging message for no shards found to indicate that export m… #3681

Merged
merged 2 commits into from
Nov 16, 2023

Conversation

graytaylor0
Copy link
Member

@graytaylor0 graytaylor0 commented Nov 16, 2023

…ay still be ongoing

Description

Reduces the logging for no shards acquired to every 50 retries (approximately every 12 minutes) and only if there are no shards being processed at the time on the node, with an error message that indicates this may be due to either all shards being consumed already (by other nodes), or that an export is still in progress if export is configured.

This log makes it so that when no shards are available or the export is ongoing, we will not just see this as the final log

2023-11-16T19:22:14.987 [dynamodb-pipeline-sink-worker-2-thread-1] INFO  org.opensearch.dataprepper.pipeline.Pipeline - Pipeline [dynamodb-pipeline] - Submitting request to initiate the pipeline processing

Which makes the node appear stuck and like it is not doing anything

Check List

  • New functionality includes testing.
  • New functionality has a documentation issue. Please link to it in this PR.
    • New functionality has javadoc added
  • Commits are signed with a real name per the DCO

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

dlvenable
dlvenable previously approved these changes Nov 16, 2023
@@ -95,7 +95,7 @@ public void start(Buffer<Record<Event>> buffer) {
Runnable fileLoaderScheduler = new DataFileScheduler(coordinator, loaderFactory, pluginMetrics, acknowledgementSetManager, dynamoDBSourceConfig);

ShardConsumerFactory consumerFactory = new ShardConsumerFactory(coordinator, dynamoDbStreamsClient, pluginMetrics, buffer);
Runnable streamScheduler = new StreamScheduler(coordinator, consumerFactory, pluginMetrics, acknowledgementSetManager, dynamoDBSourceConfig, new BackoffCalculator());
Runnable streamScheduler = new StreamScheduler(coordinator, consumerFactory, pluginMetrics, acknowledgementSetManager, dynamoDBSourceConfig, new BackoffCalculator(dynamoDBSourceConfig.getTableConfigs().get(0).getExportConfig() != null));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NPE is handled for dynamoDBSourceConfig.getTableConfigs().get(0) ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We validate it is exactly one here so should be fine yes? (

@AssertTrue(message = "Exactly one table must be configured for the DynamoDb source.")
)

@graytaylor0 graytaylor0 merged commit 92224c2 into opensearch-project:main Nov 16, 2023
62 of 64 checks passed
@graytaylor0 graytaylor0 deleted the DdbLogging branch November 16, 2023 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants