The Wayback Machine - https://web.archive.org/web/20220723234140/https://github.com/localstack/localstack/issues/6506
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

bug: Unable to set -inMemory for Dynamodb #6506

Open
1 task done
danielpoonwj opened this issue Jul 23, 2022 · 1 comment
Open
1 task done

bug: Unable to set -inMemory for Dynamodb #6506

danielpoonwj opened this issue Jul 23, 2022 · 1 comment
Labels
aws:dynamodb good first issue status: triage needed type: bug

Comments

@danielpoonwj
Copy link

@danielpoonwj danielpoonwj commented Jul 23, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

There's no way to explicitly toggle the -inMemory flag for DynamoDB - it relies on db_path being unset. However, db_path is always set because it relies on config.dirs.data, which is always set.

Expected Behavior

Maybe have an explicit env var like DYNAMODB_IN_MEMORY to force -inMemory mode or fix the path based logic in which it can be enabled.

Use case: I'm running tests on an ephemeral localstack container and don't need persistence. I think I'm experiencing the performance hit in #1205 and -inMemory seems be significantly faster.

How are you starting LocalStack?

With a docker-compose file

Steps To Reproduce

docker-compose.yml

version: '3.8'
services:
  localstack:
    image: localstack/localstack:1.0
    environment:
      - EDGE_PORT=4566
      - EAGER_SERVICE_LOADING=1
      - SERVICES=dynamodb
      - PERSISTENCE=0
$ docker-compose up
...
localstack_1      | 2022-07-23T05:27:50.506  INFO --- [   Thread-12] l.services.dynamodb.server : Initializing DynamoDB Local with the following configuration:
localstack_1      | 2022-07-23T05:27:50.506  INFO --- [   Thread-12] l.services.dynamodb.server : Port:	34585
localstack_1      | 2022-07-23T05:27:50.506  INFO --- [   Thread-12] l.services.dynamodb.server : InMemory:	false
localstack_1      | 2022-07-23T05:27:50.506  INFO --- [   Thread-12] l.services.dynamodb.server : DbPath:	/var/lib/localstack/tmp/state/dynamodb
localstack_1      | 2022-07-23T05:27:50.506  INFO --- [   Thread-12] l.services.dynamodb.server : SharedDb:	false
localstack_1      | 2022-07-23T05:27:50.506  INFO --- [   Thread-12] l.services.dynamodb.server : shouldDelayTransientStatuses:	false
localstack_1      | 2022-07-23T05:27:50.506  INFO --- [   Thread-12] l.services.dynamodb.server : CorsParams:	*
...

Environment

- OS: Docker on Mac M1
- LocalStack: 1.0.1

Anything else?

No response

@danielpoonwj danielpoonwj added status: triage needed type: bug labels Jul 23, 2022
@localstack-bot
Copy link
Collaborator

@localstack-bot localstack-bot commented Jul 23, 2022

Welcome to LocalStack! Thanks for reporting your first issue and our team will be working towards fixing the issue for you or reach out for more background information. We recommend joining our Slack Community for real-time help and drop a message to LocalStack Pro Support if you are a Pro user! If you are willing to contribute towards fixing this issue, please have a look at our contributing guidelines and our developer guide.

@thrau thrau added aws:dynamodb good first issue labels Jul 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws:dynamodb good first issue status: triage needed type: bug
Projects
None yet
Development

No branches or pull requests

3 participants