Skip to content

DynamoDB: Fix hangup when resetting state #11789

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

Merged
merged 1 commit into from
Nov 6, 2024
Merged

Conversation

viren-nadkarni
Copy link
Member

Background

This PR fixes DynamoDB provider hanging up when performing state reset using POST /_localstack/state/reset.

Changes

This bug was caused in the underlying Server abstraction, where the threading.Event that track the runtime state where not correctly updated.

This was not a problem earlier because fresh server objects were being created after state resets. The DynamoDB server object was recently made a singleton in #11688

@viren-nadkarni viren-nadkarni self-assigned this Nov 6, 2024
@viren-nadkarni viren-nadkarni added the semver: patch Non-breaking changes which can be included in patch releases label Nov 6, 2024
Copy link

github-actions bot commented Nov 6, 2024

LocalStack Community integration with Pro

  2 files  ±    0    2 suites  ±0   26m 7s ⏱️ - 1h 16m 17s
869 tests  - 2 665  809 ✅  - 2 310  60 💤  - 355  0 ❌ ±0 
871 runs   - 2 665  809 ✅  - 2 310  62 💤  - 355  0 ❌ ±0 

Results for commit b969cdc. ± Comparison against base commit 392b1f4.

This pull request removes 2665 tests.
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_lambda_dynamodb
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_opensearch_crud
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_search_books
tests.aws.scenario.bookstore.test_bookstore.TestBookstoreApplication ‑ test_setup
tests.aws.scenario.kinesis_firehose.test_kinesis_firehose.TestKinesisFirehoseScenario ‑ test_kinesis_firehose_s3
tests.aws.scenario.lambda_destination.test_lambda_destination_scenario.TestLambdaDestinationScenario ‑ test_destination_sns
tests.aws.scenario.lambda_destination.test_lambda_destination_scenario.TestLambdaDestinationScenario ‑ test_infra
tests.aws.scenario.loan_broker.test_loan_broker.TestLoanBrokerScenario ‑ test_prefill_dynamodb_table
tests.aws.scenario.loan_broker.test_loan_broker.TestLoanBrokerScenario ‑ test_stepfunctions_input_recipient_list[step_function_input0-SUCCEEDED]
tests.aws.scenario.loan_broker.test_loan_broker.TestLoanBrokerScenario ‑ test_stepfunctions_input_recipient_list[step_function_input1-SUCCEEDED]
…

♻️ This comment has been updated with latest results.

Copy link
Member

@giograno giograno left a comment

Choose a reason for hiding this comment

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

Thanks for jumping on this very quickly and for the provided details!

I tried locally and can confirm this solves the issue 💯

@viren-nadkarni viren-nadkarni merged commit 8fe966d into master Nov 6, 2024
32 checks passed
@viren-nadkarni viren-nadkarni deleted the ddb-reset-race branch November 6, 2024 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver: patch Non-breaking changes which can be included in patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants